更新 :
运行sudo rm /var/lib/apt/lists/partial/*临时允许sudo apt-get update工作。
原文 :
我已经看到类似这样的问题的答案,但答案是“你的Ubuntu版本不再被支持”。
我们正在使用12.04服务器,这是一个LTS版本。 据我所知,这意味着精确的软件包应该存在,直到支持结束。
这些错误在一两周前才开始显现。 如果有帮助,服务器在Amazon EC2上。
我运行sudo apt-get update并得到以下错误:
Hit http://repos.sensuapp.org sensu Release.gpg Hit http://repos.sensuapp.org sensu Release Hit http://security.ubuntu.com precise-security Release.gpg Hit http://packages.treasure-data.com precise Release.gpg Hit http://us-east-1.ec2.archive.ubuntu.com precise Release.gpg Hit http://packages.treasure-data.com precise Release Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates Release.gpg Hit http://security.ubuntu.com precise-security Release Hit http://repos.sensuapp.org sensu/main amd64 Packages Hit http://packages.treasure-data.com precise/contrib amd64 Packages Hit http://packages.treasure-data.com precise/contrib i386 Packages Hit http://us-east-1.ec2.archive.ubuntu.com precise Release Ign http://packages.treasure-data.com precise/contrib TranslationIndex Hit http://repos.sensuapp.org sensu/main i386 Packages Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates Release Ign http://repos.sensuapp.org sensu/main TranslationIndex Hit http://security.ubuntu.com precise-security/main Sources Hit http://security.ubuntu.com precise-security/universe Sources Hit http://us-east-1.ec2.archive.ubuntu.com precise/main Sources Hit http://security.ubuntu.com precise-security/main amd64 Packages Ign http://packages.treasure-data.com precise/contrib Translation-en_US Ign http://packages.treasure-data.com precise/contrib Translation-en Hit http://security.ubuntu.com precise-security/universe amd64 Packages Hit http://ppa.launchpad.net precise Release.gpg Hit http://security.ubuntu.com precise-security/main i386 Packages Hit http://security.ubuntu.com precise-security/universe i386 Packages Hit http://us-east-1.ec2.archive.ubuntu.com precise/main i386 Packages Hit http://security.ubuntu.com precise-security/main TranslationIndex Ign http://repos.sensuapp.org sensu/main Translation-en_US Hit http://security.ubuntu.com precise-security/universe TranslationIndex Ign http://repos.sensuapp.org sensu/main Translation-en Hit http://ppa.launchpad.net precise Release.gpg Hit http://us-east-1.ec2.archive.ubuntu.com precise/main TranslationIndex Hit http://security.ubuntu.com precise-security/main Translation-en Hit http://us-east-1.ec2.archive.ubuntu.com precise/universe TranslationIndex Hit http://security.ubuntu.com precise-security/universe Translation-en Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/main Sources Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe Sources Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/main amd64 Packages Hit http://ppa.launchpad.net precise Release Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe amd64 Packages Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/main i386 Packages Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe i386 Packages Hit http://ppa.launchpad.net precise Release Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/main TranslationIndex Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe TranslationIndex Hit http://ppa.launchpad.net precise/main amd64 Packages Hit http://us-east-1.ec2.archive.ubuntu.com precise/main Translation-en Hit http://us-east-1.ec2.archive.ubuntu.com precise/universe Translation-en Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/main Translation-en Hit http://us-east-1.ec2.archive.ubuntu.com precise-updates/universe Translation-en Hit http://ppa.launchpad.net precise/main i386 Packages Err http://us-east-1.ec2.archive.ubuntu.com precise/universe Sources 404 Not Found [IP: 91.189.91.24 80] Hit http://ppa.launchpad.net precise/main TranslationIndex Err http://us-east-1.ec2.archive.ubuntu.com precise/main amd64 Packages 404 Not Found [IP: 91.189.91.24 80] Err http://us-east-1.ec2.archive.ubuntu.com precise/universe amd64 Packages 404 Not Found [IP: 91.189.91.24 80] Err http://us-east-1.ec2.archive.ubuntu.com precise/universe i386 Packages 404 Not Found [IP: 91.189.91.24 80] Hit http://ppa.launchpad.net precise/main amd64 Packages Hit http://ppa.launchpad.net precise/main i386 Packages Hit http://ppa.launchpad.net precise/main TranslationIndex Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/precise/universe/source/Sources 404 Not Found [IP: 91.189.91.24 80] W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/precise/main/binary-amd64/Packages 404 Not Found [IP: 91.189.91.24 80] W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-amd64/Packages 404 Not Found [IP: 91.189.91.24 80] W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages 404 Not Found [IP: 91.189.91.24 80] E: Some index files failed to download. They have been ignored, or old ones used instead.
find这个,这可能是你的经验, AWS论坛 。
它似乎切换你使用的镜像
us-east-1d.clouds
应该做的伎俩。
正如在这里指出的,你所要做的就是从URL中删除us-east-1.ec2 。
sudo sed -i 's/us-east-1\.ec2\.//g' /etc/apt/sources.list