您的位置:首页 > 其它

Ubuntu apt-get install 问题: Could not resolve 'cn.archive.ubuntu.com'

2015-10-25 15:07 507 查看
网上很多朋友给了很多启发,其实都是配置问题,打开hosts将正向解析映射输入进去

解决方法:

从Error Message 上看来似乎是“cn.archive.ubuntu.com”域名解析出错。于是在Terminal 里Ping了一下这个域名,发现可以Ping 通。

ping cn.archive.ubuntu.com
PING mirror.neu.edu.cn (202.118.1.64) 56(84) bytes of data.

64 bytes from ftp2.neu.edu.cn (202.118.1.64): icmp_seq=1 ttl=45 time=86.3 ms

64 bytes from ftp2.neu.edu.cn (202.118.1.64): icmp_seq=2 ttl=45 time=100 ms

64 bytes from ftp2.neu.edu.cn (202.118.1.64): icmp_seq=3 ttl=45 time=86.8 ms

于是尝试通过修改 /etc/hosts 解决这个问题:
vi /etc/hosts
在文件末尾加入 “202.118.1.64 cn.archive.ubuntu.com”。
运行 “#/etc/init.d/networking restart” 重启网络。
运行 “sudo apt-get install xinit
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: