以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
并且在主机上运行的名称服务器是192.168.1.2吗?那是你的路由器吗?您的路由器是否将DNS请求转发到上游DNS服务器,例如您的ISP?这有用吗?这是基本调试,不是编程问题。
—
ghoti
是的,这是我的服务器所连接的路由器。
—
肖恩