以 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 到服务器。
答案1
您的 DNS 解析器似乎存在问题。
Could not resolve 'security.debian.org'
Could not resolve 'ftp.us.debian.org'
等等,等等
答案2
添加更多细节可能会有所帮助。
您尝试过哪些故障排除?
apt-get update 以前能工作吗,但最近停止工作了?
您能否 ping 错误中列出的任何站点?
答案3
我不得不对此进行大量的搜索。
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