Ubuntu 20.04 更新在 in.archive.ubuntu.com 上失败吗

Abh*_*kar 2 updates apt

印度位置的 apt-get 更新失败。它无法访问 in.archive.ubuntu.com。

以下是错误:

# apt-get update 
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease                  
Err:3 http://in.archive.ubuntu.com/ubuntu focal InRelease                         
  Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable) Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out
Err:4 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
  Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable)
Err:5 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
  Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable)
Reading package lists... Done
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable) Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable)
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable)
W: Some index files failed to download. They have been ignored, or old ones used instead.

Run Code Online (Sandbox Code Playgroud)

有人可以在这里建议/帮助吗?

Abh*_*kar 5

感谢 DK Bose 的评论,更改服务器有所帮助。虽然它间歇性地失败,但它开始工作。以下是解决此问题的方法。以 root 身份运行以下命令

cd /etc/apt
sed -i 's/in\./us\./g' sources.list
Run Code Online (Sandbox Code Playgroud)

下面应该是下一次 apt-get 更新的输出

# apt-get update 
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease                               
Hit:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease                       
Get:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Hit:5 http://dl.google.com/linux/chrome/deb stable InRelease
Fetched 205 kB in 6s (36.3 kB/s)                 
Reading package lists... Done
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助!

〜阿拜·丹德卡