那里买到正货听话水:(-5 - No address associated with hostname

来源:百度文库 编辑:偶看新闻 时间:2024/05/02 03:05:09

当执行sudo apt-get update来更新软件源时,若出现以下类似错误: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/Release.gpg Something wicked happened resolving 'cn.archive.ubuntu.com:http' (-5 - No address associated with hostname)

说明DNS解析出现了问题,应着重查看以下方面:

1. cat /etc/resolv.conf

查看里面的domain, search和nameserver配置是否正确。

若通过代理上网,请查看:

2. cat /etc/apt/apt.conf

在里面添加设置:

Acquire::http::proxy "http://xxxxx.xxxxx.xxxx:1080" , 注意是http, 不是https

3. 查看 “系统”--> “首选项”--> “网络代理”,里面的代理是否设置正确。

 

若爆出 404 Not Find 的错误,多半是Url地址不可访问,可将url放进浏览器中,逐级调试,看看究竟是哪个目录出现的问题,多数情况下是由于某些软件源中的ubuntu目录的大小写发生了变化,由原来的"ubuntu"变成了"Ubuntu"。所以要在Url中改正过来再update