apt-get update (-5 - No address associated with hostname)

说明DNS解析出现了问题,应着重查看以下方面:
1. cat /etc/resolv.conf
查看里面的domain,search 和nameserver 配置是否正确

比如:
root@try# cat /etc/resolv.conf
# Generated by NetworkManager
domain sh.xxx.com (xxx is company name)
search sh.xxx.com
nameserver 10.248.2.5
nameserver 10.239.27.228
nameserver 172.17.6.9

若通过代理上网,请查看:
2. cat /etc/apt/apt.conf
在里面添加设置:
Acquire::http::proxy "http://proxy.pd.xxx.com:911",注意是http,不是https
3. 查看“系统” -->”首选项“-->”网络代理“,里面的代理是否设置正确



若报出404 not found的错误,多半是URL 地址不可访问。

你可能感兴趣的:(error,update,apt-get)