Amazon-Ec2

Ubuntu 12.04 LTS - apt-get 更新找不到源

  • June 10, 2016

更新

sudo rm /var/lib/apt/lists/partial/*臨時執行允許sudo apt-get update工作。

原文

我見過類似問題的答案,但答案是“不再支持您的 ubuntu 版本”。

我們使用的是 LTS 版本的 12.04 Server。據我所知,這意味著在支持結束之前應該存在精確的包。

這些錯誤大約在一兩週前才開始出現。如果有幫助,伺服器在 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.

找到了這個,這可能是你所經歷的,AWS 論壇

好像切換了你使用的鏡像

us-east-1d.clouds

應該做的伎倆。

正如這裡所指出的,您需要做的就是us-east-1.ec2從 URL 中刪除。

sudo sed -i 's/us-east-1\.ec2\.//g' /etc/apt/sources.list

引用自:https://serverfault.com/questions/641982