無法啟動與 archive.ubuntu.com:80 (2001:67c:1360:8001::24) 的連接,網路無法存取) [IP: 91.189.88.142 80

無法啟動與 archive.ubuntu.com:80 (2001:67c:1360:8001::24) 的連接,網路無法存取) [IP: 91.189.88.142 80

所以我剛剛對 Linux Mint 20 進行了全新安裝,但這個問題在 Linux Mint 19.3 中也存在。每次我嘗試從軟體管理器執行apt-get updateapt-get upgrade甚至下載軟體時,都會出現錯誤。當我嘗試更新更新管理器推薦的內容時,發生了同樣的事情。

我發現如果我sudo apt-get update/upgrade在每次失敗的嘗試後繼續運行該命令,我可以升級或更新。由於每次更新/升級都以一定的百分比停止,當我再次運行該命令時,它會從相同的百分比繼續,並通過執行幾次更新/升級最終完成。

這是我嘗試從軟體管理員下載 VLC 時遇到的錯誤。它首先說:

Failed to download package files
Check your Internet connection.

詳細資料是:

Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/s/sdl-image1.2/libsdl-image1.2_1.2.12-12_amd64.deb Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out [IP: 91.189.88.142 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/s/sidplay-libs/libsidplay2_2.1.1-15ubuntu2_amd64.deb Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 91.189.88.142 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/libs/libspatialaudio/libspatialaudio0_0.3.0+git20180730+dfsg1-2build1_amd64.deb Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 91.189.88.142 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/s/srt/libsrt1_1.4.0-1build1_amd64.deb Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 91.189.88.142 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/libs/libssh2/libssh2-1_1.8.0-2.1build1_amd64.deb Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 91.189.88.142 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/p/pupnp-1.8/libupnp13_1.8.4-2ubuntu2_amd64.deb Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 91.189.88.142 80]

....等等。

error 隨處可見的兩個特定誤差值是2001:67c:1360:8001::2391.189.88.152。我的機器現在使用的軟體來源是:

(Main) http://packages.linuxmint.com
(Focal) http://archive.ubuntu.com/ubuntu

我嘗試將焦點來源更改為許多不同的來源,但沒有成功。我什至搞亂了之前source.list的文件/etc/apt/source.list.d,並且由於許多問題而不得不重新安裝 Linux。所以我真的不知道在這裡該怎麼辦,並且發現許多其他人也有同樣的問題。

答案1

這看起來像是 IPv6 堆疊配置錯誤。 Linux 認為它有 IPv6 並嘗試使用它(實際上更喜歡它)進行連接。

您可以強制apt-get使用 IPv4 新增-o Acquire::ForceIPv4=true。例如:

$ sudo apt-get -o Acquire::ForceIPv4=true update

如果您想要讓該選項永久存在,您可以將其新增至 中的檔案中/etc/apt/apt.conf.d/,例如內部/etc/apt/apt.conf.d/99only-ipv4

Acquire::ForceIPv4 "true";

相關內容