apt-get update命令的问题

时间:2017-02-15 21:37:48

标签: linux operating-system debian

当我尝试运行命令sudo apt-get update时,我得到以下内容:

Ign http://security.debian.org jessie/updates InRelease
Ign http://security.debian.org jessie/updates Release.gpg                                 
Ign http://security.debian.org jessie/updates Release                                      
Ign http://security.debian.org jessie/updates/main Sources/DiffIndex                       
Ign http://packages.dotdeb.org jessie InRelease                                            
Ign http://httpredir.debian.org jessie InRelease                                           
Ign http://security.debian.org jessie/updates/contrib Sources/DiffIndex                                          
Ign http://httpredir.debian.org jessie-updates InRelease                                                         
Ign http://ftp.debian.org jessie InRelease                                                                       
Hit http://debmon.org debmon-jessie InRelease                                              
Ign http://security.debian.org jessie/updates/non-free Sources/DiffIndex                                            
Ign http://httpredir.debian.org jessie Release.gpg                                                               
Ign http://ftp.debian.org jessie-updates InRelease                                                               
Ign http://packages.dotdeb.org jessie Release.gpg                                          
Ign http://security.debian.org jessie/updates/main amd64 Packages/DiffIndex                
Ign http://security.debian.org jessie/updates/contrib amd64 Packages/DiffIndex                                   
Ign http://httpredir.debian.org jessie-updates Release.gpg                                                       
Ign http://packages.dotdeb.org jessie Release                                                                    
Ign http://security.debian.org jessie/updates/non-free amd64 Packages/DiffIndex            
Ign http://httpredir.debian.org jessie Release                                                                   
Hit http://ftp.debian.org jessie Release.gpg                                                                     
Ign http://ftp.debian.org jessie-updates Release.gpg                                       
Ign http://httpredir.debian.org jessie-updates Release                                     
Hit http://debmon.org debmon-jessie/main amd64 Packages                                    
Ign http://packages.dotdeb.org jessie/all Sources/DiffIndex                                                                     
Ign http://packages.dotdeb.org jessie/all amd64 Packages/DiffIndex                                                
Hit http://ftp.debian.org jessie Release                                                                          
Ign http://ftp.debian.org jessie-updates Release                                                                                        
Ign http://debmon.org debmon-jessie/main Translation-en_NZ                                                        
Ign http://debmon.org debmon-jessie/main Translation-en                                                           
Ign http://ftp.debian.org jessie-updates/main Sources/DiffIndex                                                                                                                                                   
Ign http://ftp.debian.org jessie-updates/contrib Sources/DiffIndex                                                                                                                                                
Ign http://ftp.debian.org jessie-updates/non-free Sources/DiffIndex                                                                                                                                               
Get:1 http://ftp.debian.org jessie-updates/main amd64 Packages/DiffIndex [6,916 B]                                                                                                                                
Ign http://ftp.debian.org jessie-updates/contrib amd64 Packages/DiffIndex                                                                                                                                         
Get:2 http://ftp.debian.org jessie-updates/non-free amd64 Packages/DiffIndex [736 B]                                                                                                                              
Ign http://security.debian.org jessie/updates/contrib Translation-en_NZ                                                                                                                                           
Ign http://security.debian.org jessie/updates/contrib Translation-en                                                                                                                                              
Ign http://security.debian.org jessie/updates/main Translation-en_NZ                                                                                                                                              
Ign http://packages.dotdeb.org jessie/all Translation-en_NZ                                                                                                                                                       
Ign http://security.debian.org jessie/updates/main Translation-en                                                                                                                                                 
Ign http://security.debian.org jessie/updates/non-free Translation-en_NZ                                                                                                                                          
Hit http://ftp.debian.org jessie/main Sources                                                                                                                                                                     
Ign http://packages.dotdeb.org jessie/all Translation-en                                                                                                                                                          
Ign http://security.debian.org jessie/updates/non-free Translation-en                                                                                                                                             
Hit http://ftp.debian.org jessie/contrib Sources                                                                                                                                                                  
Err http://packages.dotdeb.org jessie/all Sources                                                                                                                                                                 
  503  OUT OF DISK SPACE
Err http://security.debian.org jessie/updates/main Sources                                                                                                                                                        
  404  Not Found
Hit http://ftp.debian.org jessie/non-free Sources                                                                                                                                                                 
Err http://security.debian.org jessie/updates/contrib Sources                                                                                                                                                     
  404  Not Found
Hit http://ftp.debian.org jessie/main amd64 Packages                                                                                                                                                              
Hit http://ftp.debian.org jessie/contrib amd64 Packages                                                                                                                                                           
Err http://security.debian.org jessie/updates/non-free Sources                                                                                                                                                    
  404  Not Found
Err http://packages.dotdeb.org jessie/all amd64 Packages                                                                                                                                                          
  503  OUT OF DISK SPACE
Hit http://ftp.debian.org jessie/non-free amd64 Packages                                                                                                                                                          
Err http://security.debian.org jessie/updates/main amd64 Packages                                                                                                                                                 
  404  Not Found
Hit http://ftp.debian.org jessie/contrib Translation-en                                                                                                                                                           
Err http://security.debian.org jessie/updates/contrib amd64 Packages                                                                                                                                              
  404  Not Found
Hit http://ftp.debian.org jessie/main Translation-en                                                                                                                                                              
Err http://security.debian.org jessie/updates/non-free amd64 Packages                                                                                                                                             
  404  Not Found
Hit http://ftp.debian.org jessie/non-free Translation-en                                                                                                                                                          
Ign http://ftp.debian.org jessie-updates/contrib Translation-en_NZ                                                                                                                                                
Ign http://ftp.debian.org jessie-updates/contrib Translation-en
Ign http://ftp.debian.org jessie-updates/main Translation-en_NZ
Ign http://ftp.debian.org jessie-updates/main Translation-en
Ign http://ftp.debian.org jessie-updates/non-free Translation-en_NZ
Ign http://ftp.debian.org jessie-updates/non-free Translation-en
Err http://ftp.debian.org jessie-updates/main Sources
  404  Not Found
Err http://ftp.debian.org jessie-updates/contrib Sources
  404  Not Found
Err http://ftp.debian.org jessie-updates/non-free Sources
  404  Not Found
Err http://ftp.debian.org jessie-updates/contrib amd64 Packages
  404  Not Found
Err http://httpredir.debian.org jessie/main amd64 Packages
  404  Not Found
Err http://httpredir.debian.org jessie/contrib amd64 Packages
  404  Not Found
Err http://httpredir.debian.org jessie/non-free amd64 Packages
  404  Not Found
Ign http://httpredir.debian.org jessie/contrib Translation-en_NZ
Ign http://httpredir.debian.org jessie/contrib Translation-en
Ign http://httpredir.debian.org jessie/main Translation-en_NZ
Ign http://httpredir.debian.org jessie/main Translation-en
Ign http://httpredir.debian.org jessie/non-free Translation-en_NZ
Ign http://httpredir.debian.org jessie/non-free Translation-en
Err http://httpredir.debian.org jessie-updates/main amd64 Packages
  404  Not Found
Err http://httpredir.debian.org jessie-updates/contrib amd64 Packages
  404  Not Found
Err http://httpredir.debian.org jessie-updates/non-free amd64 Packages
  404  Not Found
Ign http://httpredir.debian.org jessie-updates/contrib Translation-en_NZ
Ign http://httpredir.debian.org jessie-updates/contrib Translation-en
Ign http://httpredir.debian.org jessie-updates/main Translation-en_NZ
Ign http://httpredir.debian.org jessie-updates/main Translation-en
Ign http://httpredir.debian.org jessie-updates/non-free Translation-en_NZ
Ign http://httpredir.debian.org jessie-updates/non-free Translation-en
Fetched 7,652 B in 58s (130 B/s)
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/source/Sources  404  Not Found

W: Failed to fetch http://security.debian.org/dists/jessie/updates/contrib/source/Sources  404  Not Found

W: Failed to fetch http://security.debian.org/dists/jessie/updates/non-free/source/Sources  404  Not Found

W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://security.debian.org/dists/jessie/updates/contrib/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://security.debian.org/dists/jessie/updates/non-free/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/contrib/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/non-free/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/contrib/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/non-free/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://packages.dotdeb.org/dists/jessie/all/source/Sources  503  OUT OF DISK SPACE

W: Failed to fetch http://packages.dotdeb.org/dists/jessie/all/binary-amd64/Packages  503  OUT OF DISK SPACE

W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/main/source/Sources  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/contrib/source/Sources  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/non-free/source/Sources  404  Not Found

W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-updates/contrib/binary-amd64/Packages  404  Not Found

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

另外,我不小心删除了php5软件包,现在我无法安装它们,我认为为什么我无法安装丢失的软件包的问题是由于无法成功运行apt-get引起的。 我使用的是Linux Debian Jessie v8

请帮忙, 谢谢::))

1 个答案:

答案 0 :(得分:1)

我设法解决了这个问题,下面我逐步发布了如何解决它的指南:

  1. 确保系统使用的任何第三方存储库都是通过从/etc/apt/sources.list.d/{thirdpartyfilename.list}中注释掉来禁用的。
  2. 如果您不确定如何生成有效的源列表,请确保文件/etc/apt/sources.list具有正确的有效源列表,您可以通过此网站使用生成器https://debgen.simplylinux.ch/位置,您正在使用的软件的发布(例如Debian Jessie),并确保勾选Debian Branches和Debian更新的所有方框
  3. 通常情况下,源列表可能不是最新的,因此将源位置更改为其他国家/地区的服务器实际上可能会使其工作。例如。 http://ftp.debian.org可能会给出损坏的结果,因此将其更改为http://ftp.au.debian.orghttp://ftp.us.debian.org可能会使其正常工作
  4. 修复源列表404未找到错误意味着现在您应该能够通过运行命令 sudo apt-get update 来修补系统,从而能够安装任何丢失或损坏的软件包(未满足的依赖关系)只需运行命令 sudo apt-get -f install