apt-get 无法连接到 Ubuntu 主档案库

apt-get 无法连接到 Ubuntu 主档案库

我开始了我的旅程apt-get update。我收到了错误消息

Err:1 http://ke.archive.ubuntu.com/ubuntu focal InRelease
  Cannot initiate the connection to ke.archive.ubuntu.com:80 (2c0f:fe40:8001:10::1). - connect (101: Network is unreachable) 
  Could not connect to ke.archive.ubuntu.com:80 (197.155.77.1), connection timed out

然后我按照可能的解决方案这个类似的问题。我编辑了/etc/apt/sources.list,将其替换ke.archive.ubuntu.com为主archive.ubuntu.com服务器。现在的新错误是:

Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
  Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable)
  Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4002:1::102). - connect (101: Network is unreachable)
  Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable)
  Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4002:1::101). - connect (101: Network is unreachable)
  Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4002:1::103). - connect (101: Network is unreachable)
  Could not connect to archive.ubuntu.com:80 (91.189.91.82), connection timed out 
  Could not connect to archive.ubuntu.com:80 (91.189.91.83), connection timed out 
  Could not connect to archive.ubuntu.com:80 (185.125.190.39), connection timed out 
  Could not connect to archive.ubuntu.com:80 (91.189.91.81), connection timed out 
  Could not connect to archive.ubuntu.com:80 (185.125.190.36), connection timed out

我甚至尝试使用命令强制 IP4 apt-get -o Acquire::ForceIPv4=true update,但收到错误消息:

Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
  Could not connect to archive.ubuntu.com:80 (185.125.190.39), connection timed out 
  Could not connect to archive.ubuntu.com:80 (91.189.91.81), connection timed out 
  Could not connect to archive.ubuntu.com:80 (185.125.190.36), connection timed out 
  Could not connect to archive.ubuntu.com:80 (91.189.91.82), connection timed out 
  Could not connect to archive.ubuntu.com:80 (91.189.91.83), connection timed out

这告诉我之前的尝试同时尝试了 IP6 和 IP4。

我也尝试编辑/etc/resolv.conf将名称服务器更改为8.8.8.8,然后更改为1.1.1.1,但没有变化。甚至尝试取消注释所有内容。

  1. 命令ping -c 4 archive.ubuntu.com给出4 packets transmitted, 4 received, 0% packet loss, time 3000ms
  2. 该命令nslookup archive.ubuntu.com给出了上面的 IP 地址
  3. 我通过 SSH 连接到系统

我还能做什么来解决这个问题?

相关内容