Ubuntu 12.04 LTS-apt-get update 找不到源

Ubuntu 12.04 LTS-apt-get update 找不到源

更新

sudo rm /var/lib/apt/lists/partial/*暂时运行即可sudo apt-get update工作。

原来的

我见过类似问题的答案,但答案都是“您的 ubuntu 版本不再受支持”。

我们使用的是 12.04 Server,这是一个 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.

答案1

发现这个,这可能是你所经历的,AWS 论坛

似乎切换你使用的镜像来使用

us-east-1d.clouds

应该可以解决问题。

答案2

正如所指出的这里您需要做的就是us-east-1.ec2从 URL 中删除。

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

相关内容