Ubuntu Err:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease Could not resolve 'us.archive.ubuntu.com' 错误

Ubuntu 更新 apt-get update 的时候 出现

Err:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Could not resolve 'us.archive.ubuntu.com'

这个错误的时候 修改 resolv.conf 文件中的 nameserver 中的值。

sudo vim /etc/resolv.conf

将 nameserver 中的值替换成

nameserver 8.8.8.8

保存文件后。重启network 服务

/etc/init.d/networking restart

然后执行 sudo apt-get update 就不会报错了。

nameserver 8.8.8.8 ,修改完后所有进程都可以正常运行而不会出错。

posted @ 2020-07-06 11:35  阿拉善的樵夫  阅读(2219)  评论(0编辑  收藏  举报