微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

apt-get无法连接“故障解决’archive.ubuntu.com’”

刚刚得到一个新的VPS运行Ubuntu 11.04并试图更新它.我收到了这个错误.每当使用apt-get时我都会遇到同样的错误
login as: root
root@199.193.248.80's password:
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-8-generic-pae i686)

 * Documentation:  https://help.ubuntu.com/
Last login: Mon May  7 19:55:45 2012 from 108.192.44.54
root@Rx:~# apt-get update
Err http://security.ubuntu.com natty-security InRelease

Err http://archive.ubuntu.com natty InRelease

Err http://security.ubuntu.com natty-security Release.gpg
  Temporary failure resolving 'security.ubuntu.com'
Err http://archive.ubuntu.com natty-updates InRelease

Err http://archive.ubuntu.com natty Release.gpg
  Temporary failure resolving 'archive.ubuntu.com'
Err http://archive.ubuntu.com natty-updates Release.gpg
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/InRelease

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/Release.gpg  Temporary failure resolving 'security.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/Release.gpg  Temporary failure resolving 'archive.ubuntu.com'

W: Some index files Failed to download. They have been ignored,or old ones used instead.
root@Rx:~#

如果需要,这是我的/etc/apt/sources.list

root@Rx:/etc# more /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu natty main
deb http://archive.ubuntu.com/ubuntu natty-updates main
deb http://security.ubuntu.com/ubuntu natty-security main
deb http://archive.ubuntu.com/ubuntu natty universe
deb http://archive.ubuntu.com/ubuntu natty-updates universe

如果需要,我做了ping测试:

root@Rx:~# ping -n 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=56 time=13.3 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=56 time=13.2 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=56 time=13.4 ms
64 bytes from 8.8.8.8: icmp_req=4 ttl=56 time=13.3 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted,4 received,0% packet loss,time 3005ms
rtt min/avg/max/mdev = 13.243/13.326/13.428/0.066 ms
root@Rx:~#

这是/etc/resolv.conf

root@Rx:~# more /etc/resolv.conf
nameserver 199.193.248.1
问题是您最初的DNS服务器没有响应您的查询.您可以在列表中添加一个以进行检查. 8.8.8.8(由谷歌提供)是最容易记住的.

将行名称服务器8.8.8.8添加到/etc/resolv.conf以查询该服务器.

如果原始服务器是VPS提供商提供给您的服务器,您可能希望将其与支持团队联系起来 – 可能存在某种依赖于它的管理工具.除此之外,您可以永远使用8.8.8.8作为主DNS.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐