user@Ubuntu:~# sudo apt-get update
以下是出现的问题:
Ign natty InRelease
Ign natty-updates InRelease
Ign natty Release.gpg
Ign natty-updates Release.gpg
Ign natty Release
Ign natty InRelease
Ign natty InRelease
Ign natty-updates Release
Ign http://security.ubuntu.com natty-security InRelease
Ign natty/main Sources/DiffIndex
Ign natty/universe Sources/DiffIndex
Ign natty/multiverse Sources/DiffIndex
Ign natty/multiverse i386 Packages/DiffIndex
Hit natty Release.gpg
Ign natty Release.gpg
Ign natty/main TranslationIndex
Ign natty/multiverse TranslationIndex
Ign natty/restricted TranslationIndex
Ign natty/universe TranslationIndex
Ign http://security.ubuntu.com natty-security Release.gpg
Ign natty-updates/main Sources/DiffIndex
Ign natty-updates/multiverse Sources/DiffIndex
Ign natty-updates/main TranslationIndex
Ign natty-updates/multiverse TranslationIndex
Hit natty Release
Ign natty Release
Ign http://security.ubuntu.com natty-security Release
Ign natty-updates/restricted TranslationIndex
Hit natty/partner i386 Packages
Ign natty-updates/universe TranslationIndex
Ign http://security.ubuntu.com natty-security/main Sources/DiffIndex
Ign natty/main TranslationIndex
Ign natty/partner TranslationIndex
Ign http://security.ubuntu.com natty-security/restricted Sources/DiffIndex
Ign http://security.ubuntu.com natty-security/universe Sources/DiffIndex
Ign http://security.ubuntu.com natty-security/multiverse Sources/DiffIndex
Ign http://security.ubuntu.com natty-security/main i386 Packages/DiffIndex
Ign http://security.ubuntu.com natty-security/restricted i386 Packages/DiffIndex
Ign http://security.ubuntu.com natty-security/universe i386 Packages/DiffIndex
Ign http://security.ubuntu.com natty-security/multiverse i386 Packages/DiffIndex
Ign http://security.ubuntu.com natty-security/main TranslationIndex
Ign http://security.ubuntu.com natty-security/multiverse TranslationIndex
Ign http://security.ubuntu.com natty-security/restricted TranslationIndex
Ign http://security.ubuntu.com natty-security/universe TranslationIndex
Err natty/main Sources
404 Not Found
Err natty/main i386 Packages
404 Not Found
Ign natty/partner Translation-en_US
Ign natty/main Translation-en_US
Ign natty/partner Translation-en
Ign natty/main Translation-en
Err natty/restricted Sources
404 Not Found
Err natty/main i386 Packages
404 Not Found
Err natty/restricted i386 Packages
404 Not Found
Err natty/universe i386 Packages
404 Not Found
Err natty-updates/restricted Sources
404 Not Found
Err natty-updates/universe Sources
404 Not Found
Err natty-updates/main i386 Packages
404 Not Found
Err natty-updates/restricted i386 Packages
404 Not Found
Err natty-updates/universe i386 Packages
404 Not Found
Err natty-updates/multiverse i386 Packages
404 Not Found
Err natty/main Sources
404 Not Found
Err natty/universe Sources
404 Not Found
Err natty/multiverse Sources
404 Not Found
Err natty/multiverse i386 Packages
404 Not Found
Ign natty/main Translation-en_US
Ign natty/main Translation-en
Ign natty/multiverse Translation-en_US
Ign natty/multiverse Translation-en
Ign natty/restricted Translation-en_US
Ign natty/restricted Translation-en
Ign natty/universe Translation-en_US
Ign natty/universe Translation-en
Err natty-updates/main Sources
404 Not Found
Err natty-updates/multiverse Sources
404 Not Found
Ign natty-updates/main Translation-en_US
Ign natty-updates/main Translation-en
Ign natty-updates/multiverse Translation-en_US
Ign natty-updates/multiverse Translation-en
Ign natty-updates/restricted Translation-en_US
Ign natty-updates/restricted Translation-en
Ign natty-updates/universe Translation-en_US
Ign natty-updates/universe Translation-en
Err http://security.ubuntu.com natty-security/main Sources
404 Not Found [IP: 91.189.91.14 80]
Err http://security.ubuntu.com natty-security/restricted Sources
404 Not Found [IP: 91.189.91.14 80]
Err http://security.ubuntu.com natty-security/universe Sources
404 Not Found [IP: 91.189.91.14 80]
Err http://security.ubuntu.com natty-security/multiverse Sources
404 Not Found [IP: 91.189.91.14 80]
Err http://security.ubuntu.com natty-security/main i386 Packages
404 Not Found [IP: 91.189.91.14 80]
Err http://security.ubuntu.com natty-security/restricted i386 Packages
404 Not Found [IP: 91.189.91.14 80]
Err http://security.ubuntu.com natty-security/universe i386 Packages
404 Not Found [IP: 91.189.91.14 80]
Err http://security.ubuntu.com natty-security/multiverse i386 Packages
404 Not Found [IP: 91.189.91.14 80]
Ign http://security.ubuntu.com natty-security/main Translation-en_US
Ign http://security.ubuntu.com natty-security/main Translation-en
Ign http://security.ubuntu.com natty-security/multiverse Translation-en_US
Ign http://security.ubuntu.com natty-security/multiverse Translation-en
Ign http://security.ubuntu.com natty-security/restricted Translation-en_US
Ign http://security.ubuntu.com natty-security/restricted Translation-en
Ign http://security.ubuntu.com natty-security/universe Translation-en_US
Ign http://security.ubuntu.com natty-security/universe Translation-en
W: Failed to fetch /ubuntu/dists/natty/restricted/source/Sources 404 Not Found
W: Failed to fetch /ubuntu/dists/natty/main/binary-i386/Packages 404 Not Found
W: Failed to fetch /ubuntu/dists/natty/restricted/binary-i386/Packages 404 Not Found
W: Failed to fetch /ubuntu/dists/natty/universe/binary-i386/Packages 404 Not Found
W: Failed to fetch /ubuntu/dists/natty-updates/restricted/source/Sources 404 Not Found
W: Failed to fetch /ubuntu/dists/natty-updates/universe/source/Sources 404 Not Found
W: Failed to fetch /ubuntu/dists/natty-updates/main/binary-i386/Packages 404 Not Found
W: Failed to fetch /ubuntu/dists/natty-updates/restricted/binary-i386/Packages 404 Not Found
W: Failed to fetch /ubuntu/dists/natty-updates/universe/binary-i386/Packages 404 Not Found
W: Failed to fetch /ubuntu/dists/natty-updates/multiverse/binary-i386/Packages 404 Not Found
W: Failed to fetch /ubuntu/dists/natty/main/source/Sources 404 Not Found
W: Failed to fetch /ubuntu/dists/natty/universe/source/Sources 404 Not Found
W: Failed to fetch /ubuntu/dists/natty/multiverse/source/Sources 404 Not Found
W: Failed to fetch /ubuntu/dists/natty/multiverse/binary-i386/Packages 404 Not Found
W: Failed to fetch /ubuntu/dists/natty-updates/main/source/Sources 404 Not Found
W: Failed to fetch /ubuntu/dists/natty-updates/multiverse/source/Sources 404 Not Found
W: Failed to fetch /ubuntu/dists/natty/main/source/Sources 404 Not Found
W: Failed to fetch /ubuntu/dists/natty/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/main/source/Sources 404 Not Found [IP: 91.189.91.14 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/restricted/source/Sources 404 Not Found [IP: 91.189.91.14 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/universe/source/Sources 404 Not Found [IP: 91.189.91.14 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/multiverse/source/Sources 404 Not Found [IP: 91.189.91.14 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/main/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/restricted/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/universe/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.14 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
解决方法:
在网上找了好久才找到解决办法,所以发次博文帮助更多人解决类似问题!
问题的原因跟此版本的源有关,更换源就可以解决问题,先备份源列表文件:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo gedit /etc/apt/sources.list
把里面的内容替换为以下内容:
deb natty main restricted universe multiverse
deb natty-security main restricted universe multiverse
deb natty-updates main restricted universe multiverse
deb natty-proposed main restricted universe multiverse
deb natty-backports main restricted universe multiverse
deb-src natty main restricted universe multiverse
deb-src natty-security main restricted universe multiverse
deb-src natty-updates main restricted universe multiverse
deb-src natty-proposed main restricted universe multiverse
deb-src natty-backports main restricted universe multiverse
重载源列表,使配置生效:
sudo apt-get update