【发布时间】:2019-05-10 06:06:08
【问题描述】:
ping: google.com: Temporary failure in name resolution
这个问题是在尝试 ping 域而不是 IP 时发生的,此时在 resolve.conf 中它具有 127.0.0.57 IP,尝试添加这个
nameserver 8.8.8.8
它在短期内解决了这个问题,我将运行一个需要联系我的域控制面板的守护进程。所以我需要一个长期的解决方案。 如果有人能解决这个问题,那就太棒了。
【问题讨论】:
-
1) 禁用 systemd-resolved 服务。
sudo systemctl disable systemd-resolved.service2) 停止服务sudo systemctl stop systemd-resolved.service3) 手动删除配置文件sudo rm /etc/resolv.conf4) 现在,再次创建文件sudo nano /etc/resolv.conf5) 输入此行并保存nameserver 8.8.8.86) 启用服务@987654329 @ 7) 重新启动服务sudo systemctl start systemd-resolved.serviceGot this solution from here -
@MCNaveen 首先我建议备份
/etc/resolv.conf以防万一不顺利
标签: ubuntu dns ubuntu-18.04