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 ,修改完后所有進程都可以正常運行而不會出錯。