在 Ubuntu 14.04 LTS 上运行 sudo apt-get update 时,遇到以下错误:(我是 ubuntu 新手)。我记得上次尝试时它运行正常。
sana@sana:~$ sudo apt-get update
[sudo] password for sana:
Ign http://ir.archive.ubuntu.com trusty InRelease
Ign http://ir.archive.ubuntu.com trusty-updates InRelease
Ign http://extras.ubuntu.com trusty InRelease
Ign http://ir.archive.ubuntu.com trusty-backports InRelease
Hit http://security.ubuntu.com trusty-security InRelease
Ign http://ir.archive.ubuntu.com trusty Release.gpg
Hit http://extras.ubuntu.com trusty Release.gpg
Ign http://ir.archive.ubuntu.com trusty-updates Release.gpg
Ign http://ir.archive.ubuntu.com trusty-backports Release.gpg
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://extras.ubuntu.com trusty Release
Ign http://ir.archive.ubuntu.com trusty Release
Ign http://ir.archive.ubuntu.com trusty-updates Release
Hit http://security.ubuntu.com trusty-security/restricted Sources
Hit http://extras.ubuntu.com trusty/main Sources
Ign http://ir.archive.ubuntu.com trusty-backports Release
Ign http://ir.archive.ubuntu.com trusty/main Sources/DiffIndex
Hit http://extras.ubuntu.com trusty/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe Sources
Ign http://ir.archive.ubuntu.com trusty/restricted Sources/DiffIndex
Hit http://extras.ubuntu.com trusty/main i386 Packages
Ign http://ir.archive.ubuntu.com trusty/universe Sources/DiffIndex
Hit http://security.ubuntu.com trusty-security/multiverse Sources
Ign http://ir.archive.ubuntu.com trusty/multiverse Sources/DiffIndex
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Ign http://ir.archive.ubuntu.com trusty/main amd64 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty/restricted amd64 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty/universe amd64 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Ign http://ir.archive.ubuntu.com trusty/multiverse amd64 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty/main i386 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Ign http://ir.archive.ubuntu.com trusty/restricted i386 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty/universe i386 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Ign http://ir.archive.ubuntu.com trusty/multiverse i386 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages
Ign http://ir.archive.ubuntu.com trusty-updates/main Sources/DiffIndex
Hit http://security.ubuntu.com trusty-security/main Translation-en
Ign http://ir.archive.ubuntu.com trusty-updates/restricted Sources/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-updates/universe Sources/DiffIndex
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Ign http://ir.archive.ubuntu.com trusty-updates/multiverse Sources/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-updates/main amd64 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Ign http://ir.archive.ubuntu.com trusty-updates/restricted amd64 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-updates/universe amd64 Packages/DiffIndex
Ign http://extras.ubuntu.com trusty/main Translation-en_US
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Ign http://ir.archive.ubuntu.com trusty-updates/multiverse amd64 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-updates/main i386 Packages/DiffIndex
Ign http://extras.ubuntu.com trusty/main Translation-en
Ign http://ir.archive.ubuntu.com trusty-updates/restricted i386 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-updates/universe i386 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-updates/multiverse i386 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/main Sources/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/restricted Sources/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/universe Sources/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/multiverse Sources/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/main amd64 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/restricted amd64 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/universe amd64 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/multiverse amd64 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/main i386 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/restricted i386 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/universe i386 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty-backports/multiverse i386 Packages/DiffIndex
Ign http://ir.archive.ubuntu.com trusty/main Translation-en_US
Ign http://ir.archive.ubuntu.com trusty/main Translation-en
Ign http://ir.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://ir.archive.ubuntu.com trusty/multiverse Translation-en
Ign http://ir.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://ir.archive.ubuntu.com trusty/restricted Translation-en
Ign http://ir.archive.ubuntu.com trusty/universe Translation-en_US
Ign http://ir.archive.ubuntu.com trusty/universe Translation-en
Ign http://ir.archive.ubuntu.com trusty-updates/main Translation-en_US
Ign http://ir.archive.ubuntu.com trusty-updates/main Translation-en
Ign http://ir.archive.ubuntu.com trusty-updates/multiverse Translation-en_US
Ign http://ir.archive.ubuntu.com trusty-updates/multiverse Translation-en
Ign http://ir.archive.ubuntu.com trusty-updates/restricted Translation-en_US
Ign http://ir.archive.ubuntu.com trusty-updates/restricted Translation-en
Ign http://ir.archive.ubuntu.com trusty-updates/universe Translation-en_US
Ign http://ir.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://ir.archive.ubuntu.com trusty-backports/main Translation-en_US
Ign http://ir.archive.ubuntu.com trusty-backports/main Translation-en
Ign http://ir.archive.ubuntu.com trusty-backports/multiverse Translation-en_US
Ign http://ir.archive.ubuntu.com trusty-backports/multiverse Translation-en
Ign http://ir.archive.ubuntu.com trusty-backports/restricted Translation-en_US
Ign http://ir.archive.ubuntu.com trusty-backports/restricted Translation-en
Ign http://ir.archive.ubuntu.com trusty-backports/universe Translation-en_US
Ign http://ir.archive.ubuntu.com trusty-backports/universe Translation-en
Err http://ir.archive.ubuntu.com trusty/main Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/restricted Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/universe Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/multiverse Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/main amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/restricted amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/universe amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/multiverse amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/main i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/restricted i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/universe i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty/multiverse i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/main Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/restricted Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/universe Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/multiverse Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/main amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/restricted amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/universe amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/multiverse amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/main i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/restricted i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/universe i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-updates/multiverse i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/main Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/restricted Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/universe Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/multiverse Sources
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/main amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/restricted amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/universe amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/multiverse amd64 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/main i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/restricted i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/universe i386 Packages
404 Not Found [IP: 185.142.156.14 80]
Err http://ir.archive.ubuntu.com trusty-backports/multiverse i386 Packages
404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/main/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/restricted/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/universe/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/multiverse/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/restricted/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/universe/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/multiverse/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/restricted/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/universe/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty/multiverse/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/main/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/restricted/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/universe/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/multiverse/source/Sources 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/main/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/restricted/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/universe/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/multiverse/binary-amd64/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/main/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/restricted/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/universe/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
W: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/trusty-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 185.142.156.14 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
sana@sana:~$
/etc/apt/sources.list 文件是:
#deb cdrom:[Ubuntu 14.04.4 LTS _Trusty Tahr_ - Release amd64 (20160217.1)]/ trusty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ir.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://ir.archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ir.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://ir.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ir.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://ir.archive.ubuntu.com/ubuntu/ trusty universe
deb http://ir.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://ir.archive.ubuntu.com/ubuntu/ trusty-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ir.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://ir.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://ir.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://ir.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ir.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://ir.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main
答案1
伊朗的 Ubuntu 国家镜像从昨天起已停止服务。
如您所见,它没有任何输出:
curl -Is http://ir.archive.ubuntu.com/ubuntu | head -n 1
HTTP/1.1 404 Not Found
因此,您可以将镜像更改为其他镜像(例如其他国家或主服务器)
例如将镜像更改为主服务器:
sudo sed -i.bak 's|http://ir.|http://|g' /etc/apt/sources.list
sudo apt update
或者对我们来说改变:
sudo sed -i.bak 's/ir/us/g' /etc/apt/sources.list
sudo apt update
更新:此存储库现已修复,您可以使用它:
curl -Is http://ir.archive.ubuntu.com/ubuntu/ | head -n 1
HTTP/1.1 200 OK