如何在调整“sudo apt-get update”时修复“E:某些索引文件下载失败。它们已被忽略,或改用旧的。”?

如何在调整“sudo apt-get update”时修复“E:某些索引文件下载失败。它们已被忽略,或改用旧的。”?

这是我运行时得到的结果sudo apt-get update

Ign http://ppa.launchpad.net quantal InRelease                                 
Ign http://ppa.launchpad.net quantal InRelease                                 
Get:1 http://dl.google.com stable InRelease [1,540 B]                          
Ign http://archive.ubuntu.com quantal InRelease                                
Ign http://ppa.launchpad.net quantal InRelease                                 
Ign http://extras.ubuntu.com quantal InRelease                                 
Ign http://archive.ubuntu.com quantal-updates InRelease                        
Ign http://archive.canonical.com quantal InRelease                             
Hit http://dl.google.com stable Release.gpg                                    
Ign http://archive.ubuntu.com quantal-backports InRelease                      
Hit http://ppa.launchpad.net quantal Release.gpg                               
Hit http://extras.ubuntu.com quantal Release.gpg                               
Ign http://archive.canonical.com quantal InRelease                             
Ign http://archive.ubuntu.com quantal-security InRelease                       
Hit http://dl.google.com stable Release                                        
Hit http://ppa.launchpad.net quantal Release.gpg                               
Hit http://extras.ubuntu.com quantal Release                                   
Ign http://archive.ubuntu.com quantal-proposed InRelease                       
Hit http://archive.canonical.com quantal Release.gpg                 
Hit http://archive.ubuntu.com quantal Release.gpg                    
Hit http://ppa.launchpad.net quantal Release.gpg                     
Hit http://extras.ubuntu.com quantal/main Sources                    
Get:2 http://archive.ubuntu.com quantal-updates Release.gpg [933 B]  
Hit http://archive.canonical.com quantal Release.gpg                           
Hit http://ppa.launchpad.net quantal Release                         
Hit http://archive.ubuntu.com quantal-backports Release.gpg                    
Hit http://extras.ubuntu.com quantal/main i386 Packages                        
Hit http://archive.canonical.com quantal Release                     
Hit http://archive.ubuntu.com quantal-security Release.gpg                     
Hit http://ppa.launchpad.net quantal Release                                   
Get:3 http://archive.ubuntu.com quantal-proposed Release.gpg [933 B]           
Hit http://archive.canonical.com quantal Release                               
Hit http://ppa.launchpad.net quantal Release                                   
Hit http://archive.ubuntu.com quantal Release                                  
Hit http://archive.canonical.com quantal/partner Sources                       
Get:4 http://archive.ubuntu.com quantal-updates Release [49.6 kB]              
Hit http://ppa.launchpad.net quantal/main Sources                              
Hit http://archive.canonical.com quantal/partner i386 Packages                 
Hit http://ppa.launchpad.net quantal/main i386 Packages                        
Hit http://archive.ubuntu.com quantal-backports Release                        
Hit http://archive.ubuntu.com quantal-security Release                         
Hit http://archive.canonical.com quantal/partner Sources                       
Get:5 http://archive.ubuntu.com quantal-proposed Release [49.6 kB]             
Hit http://ppa.launchpad.net quantal/main Sources                              
Hit http://archive.canonical.com quantal/partner i386 Packages                 
Hit http://ppa.launchpad.net quantal/main i386 Packages                        
Ign http://extras.ubuntu.com quantal/main Translation-en_US                    
Ign http://extras.ubuntu.com quantal/main Translation-en                       
Hit http://archive.ubuntu.com quantal/main Sources                             
Hit http://archive.ubuntu.com quantal/restricted Sources              
Hit http://ppa.launchpad.net quantal/main Sources
Hit http://archive.ubuntu.com quantal/universe Sources
Hit http://ppa.launchpad.net quantal/main i386 Packages
Hit http://archive.ubuntu.com quantal/multiverse Sources
Hit http://archive.ubuntu.com quantal/main i386 Packages              
Hit http://archive.ubuntu.com quantal/restricted i386 Packages                 
Hit http://archive.ubuntu.com quantal/universe i386 Packages                   
Hit http://archive.ubuntu.com quantal/multiverse i386 Packages                 
Hit http://archive.ubuntu.com quantal/main Translation-en                      
Hit http://archive.ubuntu.com quantal/multiverse Translation-en                
Hit http://archive.ubuntu.com quantal/restricted Translation-en                
Ign http://archive.canonical.com quantal/partner Translation-en_US             
Hit http://archive.ubuntu.com quantal/universe Translation-en                  
Ign http://archive.canonical.com quantal/partner Translation-en                
Get:6 http://archive.ubuntu.com quantal-updates/main Sources [50.9 kB]         
Ign http://archive.canonical.com quantal/partner Translation-en_US             
Ign http://archive.canonical.com quantal/partner Translation-en                
Get:7 http://archive.ubuntu.com quantal-updates/restricted Sources [889 B]     
Get:8 http://archive.ubuntu.com quantal-updates/universe Sources [22.2 kB]     
Ign http://ppa.launchpad.net quantal/main Translation-en_US                    
Ign http://ppa.launchpad.net quantal/main Translation-en                       
Ign http://ppa.launchpad.net quantal/main Translation-en_US                    
Get:9 http://archive.ubuntu.com quantal-updates/multiverse Sources [2,940 B]   
Get:10 http://archive.ubuntu.com quantal-updates/main i386 Packages [127 kB]   
Ign http://ppa.launchpad.net quantal/main Translation-en                       
Ign http://ppa.launchpad.net quantal/main Translation-en_US                    
Ign http://ppa.launchpad.net quantal/main Translation-en                       
Get:11 http://archive.ubuntu.com quantal-updates/restricted i386 Packages [1,979 B]
Get:12 http://archive.ubuntu.com quantal-updates/universe i386 Packages [67.5 kB]
Get:13 http://archive.ubuntu.com quantal-updates/multiverse i386 Packages [8,121 B]
Hit http://archive.ubuntu.com quantal-updates/main Translation-en              
Hit http://archive.ubuntu.com quantal-updates/multiverse Translation-en        
Hit http://archive.ubuntu.com quantal-updates/restricted Translation-en        
Hit http://archive.ubuntu.com quantal-updates/universe Translation-en          
Hit http://archive.ubuntu.com quantal-backports/main Sources                   
Hit http://archive.ubuntu.com quantal-backports/restricted Sources             
Hit http://archive.ubuntu.com quantal-backports/universe Sources               
Hit http://archive.ubuntu.com quantal-backports/multiverse Sources             
Hit http://archive.ubuntu.com quantal-backports/main i386 Packages             
Hit http://archive.ubuntu.com quantal-backports/restricted i386 Packages       
Hit http://archive.ubuntu.com quantal-backports/universe i386 Packages         
Hit http://archive.ubuntu.com quantal-backports/multiverse i386 Packages       
Hit http://archive.ubuntu.com quantal-backports/main Translation-en            
Hit http://archive.ubuntu.com quantal-backports/multiverse Translation-en      
Hit http://archive.ubuntu.com quantal-backports/restricted Translation-en      
Hit http://archive.ubuntu.com quantal-backports/universe Translation-en        
Hit http://archive.ubuntu.com quantal-security/main Sources                    
Hit http://archive.ubuntu.com quantal-security/restricted Sources              
Hit http://archive.ubuntu.com quantal-security/universe Sources                
Hit http://archive.ubuntu.com quantal-security/multiverse Sources              
Hit http://archive.ubuntu.com quantal-security/main i386 Packages              
Hit http://archive.ubuntu.com quantal-security/restricted i386 Packages        
Hit http://archive.ubuntu.com quantal-security/universe i386 Packages          
Hit http://archive.ubuntu.com quantal-security/multiverse i386 Packages        
Hit http://archive.ubuntu.com quantal-security/main Translation-en             
Hit http://archive.ubuntu.com quantal-security/multiverse Translation-en
Hit http://archive.ubuntu.com quantal-security/restricted Translation-en
Hit http://archive.ubuntu.com quantal-security/universe Translation-en
Get:14 http://archive.ubuntu.com quantal-proposed/restricted i386 Packages [14 B]
Get:15 http://archive.ubuntu.com quantal-proposed/main i386 Packages [40.2 kB]
Get:16 http://archive.ubuntu.com quantal-proposed/multiverse i386 Packages [14 B]
Get:17 http://archive.ubuntu.com quantal-proposed/universe i386 Packages [81.3 kB]
Hit http://archive.ubuntu.com quantal-proposed/main Translation-en
Hit http://archive.ubuntu.com quantal-proposed/multiverse Translation-en
Hit http://archive.ubuntu.com quantal-proposed/restricted Translation-en
Hit http://archive.ubuntu.com quantal-proposed/universe Translation-en
Ign http://archive.ubuntu.com quantal/main Translation-en_US                   
Ign http://archive.ubuntu.com quantal/multiverse Translation-en_US
Ign http://archive.ubuntu.com quantal/restricted Translation-en_US
Ign http://archive.ubuntu.com quantal/universe Translation-en_US
Ign http://archive.ubuntu.com quantal-updates/main Translation-en_US
Ign http://archive.ubuntu.com quantal-updates/multiverse Translation-en_US
Ign http://archive.ubuntu.com quantal-updates/restricted Translation-en_US
Ign http://archive.ubuntu.com quantal-updates/universe Translation-en_US
Ign http://archive.ubuntu.com quantal-backports/main Translation-en_US
Ign http://archive.ubuntu.com quantal-backports/multiverse Translation-en_US
Ign http://archive.ubuntu.com quantal-backports/restricted Translation-en_US
Ign http://archive.ubuntu.com quantal-backports/universe Translation-en_US
Ign http://archive.ubuntu.com quantal-security/main Translation-en_US
Ign http://archive.ubuntu.com quantal-security/multiverse Translation-en_US
Ign http://archive.ubuntu.com quantal-security/restricted Translation-en_US
Ign http://archive.ubuntu.com quantal-security/universe Translation-en_US
Ign http://archive.ubuntu.com quantal-proposed/main Translation-en_US
Ign http://archive.ubuntu.com quantal-proposed/multiverse Translation-en_US
Ign http://archive.ubuntu.com quantal-proposed/restricted Translation-en_US
Ign http://archive.ubuntu.com quantal-proposed/universe Translation-en_US
Fetched 506 kB in 45s (11.0 kB/s)
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release
Unable to find expected entry 'main/source/Sources' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.

答案1

我在使用 apt-get update 时也遇到了同样的问题:

-PC:~$ sudo apt-get update
Ign cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012) dists/oneiric/main/binary-i386/ InRelease
Ign cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012) dists/oneiric/main/binary-i386/ Release.gpg
Ign cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012) dists/oneiric/main/binary-i386/ Release
Err cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012) dists/oneiric/main/binary-i386/ Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Ign cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012) dists/oneiric/main/binary-i386/ Translation-en_US
    .
    .
    .
Hit http://mirrors.nic.funet.fi oneiric-security/universe Translation-en
W: Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

E:部分索引文件下载失败。它们已被忽略或使用旧文件代替。

我通过从文件中E: Some index files failed to download. They have been ignored, or old ones used instead.删除行解决了该问题。deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)]/ dists/oneiric/main/binary-i386//etc/apt/sources.list

首先,我尝试从更新管理器设置中删除 cd-rom-thing,因为它似乎是导致错误的原因,并且通常会提出修复问题的方法,但这没有帮助,所以我从该 sources.list-file 中找到了 cd-rom 依赖项,将其删除后apt-get update再次正常工作!

答案2

你好,我遇到了类似的问题,正如我在另一篇文章中发布的那样(“获取失败”404 未找到,为什么?)我在我的博客
问候

相关内容