试图更新debian不工作


0

以root身份输入此命令apt-get update并获取这些错误消息。

> Err http://security.debian.org lenny/updates Release.gpg                                                                                     
  Could not resolve 'security.debian.org'
Err http://security.debian.org lenny/updates/main Translation-en_US                                                                          
  Could not resolve 'security.debian.org'
Err http://security.debian.org lenny/updates/contrib Translation-en_US                                                                       
  Could not resolve 'security.debian.org'
Err http://security.debian.org lenny/updates/non-free Translation-en_US                                                                      
  Could not resolve 'security.debian.org'
Err http://www.backports.org lenny-backports Release.gpg                                                                                     
  Could not resolve 'www.backports.org'
Err http://www.backports.org lenny-backports/main Translation-en_US                                      
  Could not resolve 'www.backports.org'
Err http://www.backports.org lenny-backports/contrib Translation-en_US                                   
  Could not resolve 'www.backports.org'
Err http://www.backports.org lenny-backports/non-free Translation-en_US                                  
  Could not resolve 'www.backports.org'
Err http://ftp.us.debian.org lenny Release.gpg                                                           
  Could not resolve 'ftp.us.debian.org'
Err http://ftp.us.debian.org lenny/main Translation-en_US              
  Could not resolve 'ftp.us.debian.org'
Err http://ftp.us.debian.org lenny/contrib Translation-en_US           
  Could not resolve 'ftp.us.debian.org'
Err http://ftp.us.debian.org lenny/non-free Translation-en_US          
  Could not resolve 'ftp.us.debian.org'
Err http://http.us.debian.org stable Release.gpg                       
  Could not resolve 'http.us.debian.org'
Err http://http.us.debian.org stable/main Translation-en_US            
  Could not resolve 'http.us.debian.org'
Err http://http.us.debian.org stable/contrib Translation-en_US         
  Could not resolve 'http.us.debian.org'
Err http://http.us.debian.org stable/non-free Translation-en_US        
  Could not resolve 'http.us.debian.org'
Reading package lists... Done                                          
W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/Release.gpg  Could not resolve 'ftp.us.debian.org'

W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/main/i18n/Translation-en_US.gz  Could not resolve 'ftp.us.debian.org'

W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/contrib/i18n/Translation-en_US.gz  Could not resolve 'ftp.us.debian.org'

W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/non-free/i18n/Translation-en_US.gz  Could not resolve 'ftp.us.debian.org'

W: Failed to fetch http://http.us.debian.org/debian/dists/stable/Release.gpg  Could not resolve 'http.us.debian.org'

W: Failed to fetch http://http.us.debian.org/debian/dists/stable/main/i18n/Translation-en_US.gz  Could not resolve 'http.us.debian.org'

W: Failed to fetch http://http.us.debian.org/debian/dists/stable/contrib/i18n/Translation-en_US.gz  Could not resolve 'http.us.debian.org'

W: Failed to fetch http://http.us.debian.org/debian/dists/stable/non-free/i18n/Translation-en_US.gz  Could not resolve 'http.us.debian.org'

W: Failed to fetch http://security.debian.org/dists/lenny/updates/Release.gpg  Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/lenny/updates/main/i18n/Translation-en_US.gz  Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/lenny/updates/contrib/i18n/Translation-en_US.gz  Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/lenny/updates/non-free/i18n/Translation-en_US.gz  Could not resolve 'security.debian.org'

W: Failed to fetch http://www.backports.org/debian/dists/lenny-backports/Release.gpg  Could not resolve 'www.backports.org'

W: Failed to fetch http://www.backports.org/debian/dists/lenny-backports/main/i18n/Translation-en_US.gz  Could not resolve 'www.backports.org'

W: Failed to fetch http://www.backports.org/debian/dists/lenny-backports/contrib/i18n/Translation-en_US.gz  Could not resolve 'www.backports.org'

W: Failed to fetch http://www.backports.org/debian/dists/lenny-backports/non-free/i18n/Translation-en_US.gz  Could not resolve 'www.backports.org'

W: Some index files failed to download, they have been ignored, or old ones used instead.
W: You may want to run apt-get update to correct these problems

这是在dreamplug linux服务器上。配置为我的网络启动192.168.1.2,我的路由器端口转发ssh到192.168.1.6到服务器。


2
看起来像网络错误或DNS错误。你可以通过DNS名称ping Internet上的主机吗?通过IP地址怎么样?你的/etc/resolv.conf文件中有什么?
ghoti

nameserver 192.168.1.2
Sean

我可以ping ip地址但不能命名空间。我最近在no-ip.com上获得了一个命名空间
Sean

1
并且在主机上运行的名称服务器是192.168.1.2吗?那是你的路由器吗?您的路由器是否将DNS请求转发到上游DNS服务器,例如您的ISP?这有用吗?这是基本调试,不是编程问题。
ghoti

是的,这是我的服务器所连接的路由器。
肖恩

Answers:


2

似乎是您的DNS解析器的问题。

Could not resolve 'security.debian.org'
Could not resolve 'ftp.us.debian.org'

等等


0

添加更多详细信息可能会有所帮助。

您尝试了哪些故障排除?

apt-get update之前是否有效,最近停止了工作?

你能ping这个错误中列出的任何网站吗?


我只是试图ping google.com但它没有用。
肖恩

BUt当我输入ping -c 4 208.67.222.222它工作了???
肖恩

我的回答应该是评论。无论如何,你的意思是“我的路由器端口转发ssh到192.168.1.6到服务器”?

只是不必要的信息。
肖恩

以前工作过。我最近从no-ip.com获得了我的服务器的命名空间,这可能是问题吗???
肖恩

0

我不得不在这个上做很多搜索。

HTTP似乎解决了问题,但FTP没有问题。我试着加入FTP://而不是HTTP://它有效。

编辑:

/etc/apt/sources.list
deb-src ftp://ftp.uk.debian.org/debian/ wheezy main
deb ftp://ftp.uk.debian.org/debian/ wheezy main
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.