Den*_*nis 5 server lts apt 16.04
全新安装 Ubuntu 16.04 服务器 tty1
26 packages can be updated
12 updates are security updates.
Run Code Online (Sandbox Code Playgroud)
当我尝试使用时sudo apt-get update,会出现:
Err:1 http://ro.archive.ubuntu.com/ubuntu xenial InRelease
temporary failure resolving 'ro.archive.ubuntu.com'
Err:2 http://ro.archive.ubuntu.com/ubuntu xenial-security InRelease
temporary failure resolving 'ro.archive.ubuntu.com'
Err:3 ... xenial-updates InRelease
temporary failure resolving 'ro.archive.ubuntu.com'
Err:4... xenial-backports InRelease
temporary failure resolving 'ro.archive.ubuntu.com'
Failed to fetch http://ro.archive.ubuntu.com/ubuntu xenial InRelease
temporary failure resolving 'ro.archive.ubuntu.com'
failed to fetch ....
...
some index failed to download. They gave been ignored,or old ones used instead.
Run Code Online (Sandbox Code Playgroud)
我跑了nslookup google.com:
connection timed out; no servers could be reached
Run Code Online (Sandbox Code Playgroud)
现在,我尝试了所有可以在 Internet 上找到的有关此问题的方法,例如在 中添加 Google DNS 服务器/etc/resolv.conf,然后dpkg-reconfigure等等。没有任何效果。
如果您需要任何其他信息来帮助我解决这个问题,我很乐意提供。我是 Ubuntu 的新手,所以我不太了解。欢迎任何额外的帮助。
先感谢您!
小智 6
就我而言,它可以在 /etc/resolvconf/resolv.conf.d/base 中设置 Google DNS (8.8.8.8)
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
Run Code Online (Sandbox Code Playgroud)
然后
sudo service resolvconf restart
Run Code Online (Sandbox Code Playgroud)
在此过程之后,我能够解析主机名和
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)
做得很好!
小智 1
我有类似的经历,其中完全关闭(甚至拔掉电源线并等待足够长的时间以清除固件等),然后重新启动为我解决了同样的问题。
关于原因,我唯一的理论是,这可能是网卡本身的某种缓存问题。
由于该主板 (Z87) 上的 NIC 是集成的,因此 ARP 缓存、首选 DNS 服务器列表等内容可能会缓存在 PRAM 中。(再说一次,我只是在这里猜测。)
由于我对 DNS 服务器列表进行了更改(我相信这最终解决了这个问题),我认为将新列表放入缓存是一个艰难的开始。无论如何,硬启动解决了这个问题,而软重置则没有。
| 归档时间: |
|
| 查看次数: |
30832 次 |
| 最近记录: |