我正在运行新安装的 Ubuntu Server 20.04。每次我尝试访问互联网或下载某些内容时,都会出现此屏幕。
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0
我尝试切换 DNS,但仍然出现此错误。当我将其他设备连接到路由器时,它所连接的路由器工作正常,只是服务器不工作。
答案1
我刚刚有一个坏的 iso -_- 。我只需重新刷新它就可以了。感谢大家的帮助。
答案2
因此显然它无法解析 DNS 地址。我建议尝试将 DNS 地址设置为 8.8.8.8,这是谷歌的 DNS 地址。您可以通过输入以下内容来执行此操作。确保将 System eth0 更改为您的连接名称。您可以通过运行第一个命令来检查连接的名称。
nmcli con show
nmcli conn modify "System eth0" ipv4.dns "8.8.8.8 8.8.8.4"