帮助我无法安装任何东西

帮助我无法安装任何东西

我尝试编辑 /etc/apt/sources.list,其中出现了下面的 ULR。提前致谢

顺便说一下我正在运行 12.04

root@p:~# apt-get update && apt-get upgrade
Hit http:// archive.canonical.com precise Release.gpg
Hit http:// dl.google.com stable Release.gpg                                                                                                                            
Ign http:// ppa.launchpad.net precise Release.gpg                                                                                                                       
Hit http:// ppa.launchpad.net precise Release.gpg                                                                                                                        
Hit http:// ppa.launchpad.net precise Release.gpg                                                                                                                        
Hit http://  ppa.launchpad.net precise Release.gpg                                                                                                                        
Ign http:// ppa.launchpad.net precise Release.gpg                                                                                                                        
Get:1 http:// ppa.launchpad.net precise Release.gpg [316 B]                                                                                                               
Hit http:// extras.ubuntu.com precise Release.gpg                                                                                                                         
Hit http:// archive.canonical.com precise Release                                                                                                                        
Ign http:// ppa.launchpad.net precise Release                                                                                                                            
Hit http:// ppa.launchpad.net precise Release                                                                                                                            
Hit http:// ppa.launchpad.net precise Release                                                                                                                            
Hit http:// ppa.launchpad.net precise Release                                                                                                                            
Ign http:// ppa.launchpad.net precise Release                                                                                                                            
Hit http:/ /dl.google.com stable Release                                                                                                                                  
Hit http:/ /extras.ubuntu.com precise Release                                                                                                                             
Hit http:// ppa.launchpad.net precise Release                                                                                                 
Ign http:// ppa.launchpad.net precise/main Sources/DiffIndex                                 
Ign http:// ppa.launchpad.net precise/main i386 Packages/DiffIndex                           
Ign http:// ppa.launchpad.net precise/main TranslationIndex            
Ign http:// ppa.launchpad.net precise Release                                                                                            
Hit http:// archive.canonical.com precise/partner i386 Packages                                                                          
Hit http:// dl.google.com stable/main i386 Packages                                                                                                        
Hit http:// extras.ubuntu.com precise/main Sources                                                                                                          
Ign http:// ppa.launchpad.net precise/main TranslationIndex                                                                                                 
Hit http:// archive.canonical.com precise/partner TranslationIndex                                                                                         
Hit http:// ppa.launchpad.net precise/main Sources                                                                                       
Hit http:// ppa.launchpad.net precise/main i386 Packages                                                           
Ign http:// ppa.launchpad.net precise/main TranslationIndex                                                                              
Hit http:// ppa.launchpad.net precise/main Sources                                                                                                         
Hit http:// ppa.launchpad.net precise/main i386 Packages                                                                                                   
Hit http:// archive.canonical.com precise/partner Translation-en                                                                                           
Hit http:// extras.ubuntu.com precise/main i386 Packages                                                                                                   
Ign http:// extras.ubuntu.com precise/main TranslationIndex                                                                          
Ign http:// ppa.launchpad.net precise/main TranslationIndex                                                                          
Ign http:// dl.google.com stable/main TranslationIndex                                                                              
Hit http:// ppa.launchpad.net precise/main Sources                                                                                    
Hit http:// ppa.launchpad.net precise/main i386 Packages                                                                              
Ign http:// ppa.launchpad.net precise/main TranslationIndex                                                     
Ign http:// ppa.launchpad.net precise/main Sources/DiffIndex                                                                          
Ign http:// ppa.launchpad.net precise/main i386 Packages/DiffIndex                                                                    
Hit http:// ppa.launchpad.net precise/main TranslationIndex                                                                           
Hit http:// ppa.launchpad.net precise/main Sources                                                                                          
Hit http:// ppa.launchpad.net precise/main i386 Packages                                                           
Hit http:// ppa.launchpad.net precise/main Translation-en                                                     
Hit http:// archive.ubuntu.com precise Release.gpg                                                                                         
Hit http:// archive.ubuntu.com precise-security Release.gpg                                                        
Err http:// ppa.launchpad.net precise/main Sources                                                                 
  404  Not Found
Hit https: //private-ppa.launchpad.net precise Release.gpg                                   
Err http: //ppa.launchpad.net precise/main i386 Packages                                                           
  404  Not Found
Err http:// ppa.launchpad.net precise/main Sources                                                                 
  404  Not Found
Hit https:// private-ppa.launchpad.net precise Release                                       
Err http:// ppa.launchpad.net precise/main i386 Packages                                                                                  
  404  Not Found
Ign http:// ppa.launchpad.net precise/main Translation-en_GB                                                       
Ign http:// ppa.launchpad.net precise/main Translation-en                                    
Ign http:// extras.ubuntu.com precise/main Translation-en_GB                                                       
Hit https:// private-ppa.launchpad.net precise/main i386 Packages                                                  
Ign http:// ppa.launchpad.net precise/main Translation-en_GB                                                                          
Get:2 https:// private-ppa.launchpad.net precise/main TranslationIndex [357 B]                                     
Ign https:// private-ppa.launchpad.net precise/main TranslationIndex                         
Hit http:// apt.insynchq.com precise Release.gpg                                                                   
Ign http:// extras.ubuntu.com precise/main Translation-en                                                          
Ign http:// ppa.launchpad.net precise/main Translation-en                                    
Ign http:// ppa.launchpad.net precise/main Translation-en_GB                                 
Ign http:// ppa.launchpad.net precise/main Translation-en              
Ign http:// ppa.launchpad.net precise/main Translation-en_GB           
Ign http:// ppa.launchpad.net precise/main Translation-en              
Ign http:// ppa.launchpad.net precise/main Translation-en_GB           
Ign http:// ppa.launchpad.net precise/main Translation-en                                    
Ign http:// dl.google.com stable/main Translation-en_GB                                      
Hit http:// apt.insynchq.com precise Release                           
Ign http:// dl.google.com stable/main Translation-en                    
Hit http:// apt.insynchq.com precise/non-free i386 Packages
Ign https:// private-ppa.launchpad.net precise/main Translation-en_GB
Ign https:// private-ppa.launchpad.net precise/main Translation-en
Hit http:// apt.insynchq.com precise/contrib i386 Packages
Hit http:// archive.ubuntu.com precise Release                      
Ign http:// apt.insynchq.com precise/contrib TranslationIndex           
Hit http:// archive.ubuntu.com precise-security Release
Ign http:// apt.insynchq.com precise/non-free TranslationIndex
Hit http:// archive.ubuntu.com precise/main Sources
Hit http:// archive.ubuntu.com precise/universe Sources
Hit http:// archive.ubuntu.com precise/restricted Sources
Hit http:// archive.ubuntu.com precise/multiverse Sources
Hit http:// archive.ubuntu.com precise/main i386 Packages
Hit http:// archive.ubuntu.com precise/universe i386 Packages       
Hit http:// archive.ubuntu.com precise/restricted i386 Packages     
Hit http:// archive.ubuntu.com precise/multiverse i386 Packages     
Hit http:// archive.ubuntu.com precise/main TranslationIndex
Hit http:// archive.ubuntu.com precise/multiverse TranslationIndex
Hit http:// archive.ubuntu.com precise/restricted TranslationIndex  
Hit http:// archive.ubuntu.com precise/universe TranslationIndex    
Hit http:// archive.ubuntu.com precise-security/main Sources
Hit http:// archive.ubuntu.com precise-security/universe Sources
Hit http:// archive.ubuntu.com precise-security/restricted Sources
Hit http:// archive.ubuntu.com precise-security/multiverse Sources
Hit http:// archive.ubuntu.com precise-security/main i386 Packages  
Hit http:// archive.ubuntu.com precise-security/universe i386 Packages
Hit http:// archive.ubuntu.com precise-security/restricted i386 Packages
Hit http:// archive.ubuntu.com precise-security/multiverse i386 Packages
Hit http:// archive.ubuntu.com precise-security/main TranslationIndex
Hit http:// archive.ubuntu.com precise-security/multiverse TranslationIndex
Hit http:// archive.ubuntu.com precise-security/restricted TranslationIndex
Hit http:// archive.ubuntu.com precise-security/universe TranslationIndex
Hit http:// archive.ubuntu.com precise/main Translation-en_GB
Hit http:// archive.ubuntu.com precise/main Translation-en
Hit http:// archive.ubuntu.com precise/multiverse Translation-en_GB
Hit http:// archive.ubuntu.com precise/multiverse Translation-en   
Hit http:// archive.ubuntu.com precise/restricted Translation-en_GB
Hit http:// archive.ubuntu.com precise/restricted Translation-en
Hit http:// archive.ubuntu.com precise/universe Translation-en_GB  
Hit http:// archive.ubuntu.com precise/universe Translation-en     
Hit http:// archive.ubuntu.com precise-security/main Translation-en
Hit http:// archive.ubuntu.com precise-security/multiverse Translation-en
Hit http:// archive.ubuntu.com precise-security/restricted Translation-en
Hit http:// archive.ubuntu.com precise-security/universe Translation-en
Ign http:// apt.insynchq.com precise/contrib Translation-en_GB
Ign http:// apt.insynchq.com precise/contrib Translation-en
Ign http:// apt.insynchq.com precise/non-free Translation-en_GB
Ign http:// apt.insynchq.com precise/non-free Translation-en
Fetched 316 B in 8s (36 B/s)                                                                                                                                             
W: GPG error: http:// ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F191A5A8844C542
W: Failed to fetch http:// ppa.launchpad.net/xorg--edgers/ppa/ubuntu/dists/precise/main/source/Sources  404  Not Found

W: Failed to fetch http:// ppa.launchpad.net/xorg--edgers/ppa/ubuntu/dists/precise/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http:// ppa.launchpad.net/nemh/gambas3/ubuntu/dists/precise/main/source/Sources  404  Not Found

W: Failed to fetch http:// ppa.launchpad.net/nemh/gambas3/ubuntu/dists/precise/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

答案1

如果第一个命令出现错误,则不会执行“&&”后面的命令。请改用 || 或 ;。(请参阅https://stackoverflow.com/questions/4510640/command-line-what-is-the-purpose-of

因此更新后(使用 sudo apt-get update),只需执行

sudo apt-get upgrade

或者

sudo apt-get dist-upgrade

在另一行/命令上(如果您不想使用 || 或 ;)。您还应该验证您的源列表是否仍然有效(以消除 apt-get update 命令中的错误,以便您可以执行 &&,并使其运行得更快)- 因此请检查源 URL 的所有警告“W:”并确保它们是最新的;如果它们已停用,只需将它们从您的软件源中删除即可。

编辑:要删除软件源(我假设您使用 Unity):
转到软件中心 > 编辑 > 软件源(或运行“software-properties-gtk”)。

然后向下滚动“软件源”选项卡并取消选中给您带来麻烦的存储库。(如果您仍然想要来自这些存储库的软件,则应添加新的更新存储库。对于 Xorg Edgers,请查看并阅读https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa)。

答案2

我在笔记本电脑上安装 Ubuntu 操作系统后也遇到了同样的情况。试试这个。

打开终端并输入以下命令并执行。

sudo apt-get 更新

相关内容