Ubuntu 20.04 Focal Fossa apt 获取更新错误

Ubuntu 20.04 Focal Fossa apt 获取更新错误

我正在使用 Ubuntu20.04 焦点窝,并且从过去几个月开始我注意到 apt 更新没有获取任何结果。之前它曾经有效

kaziray@kaziray-Lenovo-ideapad-330-15IKB:/etc/apt$ sudo apt update
[sudo] password for kaziray: 
Err:1 http://archive.canonical.com/ubuntu focal InRelease
  Could not resolve 'server'
Err:2 http://in.archive.ubuntu.com/ubuntu focal InRelease
  Could not resolve 'server'
Err:3 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
  Could not resolve 'server'
Err:4 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
  Could not resolve 'server'
Err:5 http://in.archive.ubuntu.com/ubuntu focal-security InRelease
  Could not resolve 'server'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
169 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Could not resolve 'server'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Could not resolve 'server'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Could not resolve 'server'
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/focal/InRelease  Could not resolve 'server'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-security/InRelease  Could not resolve 'server'

这是我的 /etc/resolv.conf 内容:

nameserver 127.0.0.53
nameserver 8.8.8.8
options edns0 trust-ad

我最近添加了名称服务器 8.8.8.8,然后我发现我的 sudo ping 不工作,但是 ping 工作正常。

我尝试过main服务器、India镜像Singapore,但它们都给出了相同的错误。我检查了我的 ISP 是否有防火墙,我认为没有。

对 archive.ubuntu.com 或其镜像进行 Ping 操作如预期般顺利:

kaziray@kaziray-Lenovo-ideapad-330-15IKB:/etc/apt$ sudo ping in.archive.ubuntu.com
PING in.archive.ubuntu.com (91.189.91.83) 56(84) bytes of data.
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=1 ttl=55 time=286 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=2 ttl=55 time=285 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=3 ttl=55 time=286 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=4 ttl=55 time=286 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=5 ttl=55 time=288 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=6 ttl=55 time=285 ms
^C
--- in.archive.ubuntu.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5003ms

选择主服务器、Universe、Multiverse 和受限服务器。在“其他软件”中,选择“Canonical Partners”。不选择“附加驱动程序”。

网络代理已禁用。

不知道有什么问题。

相关内容