![为什么我会收到错误 101?这与我的 DNS 有关吗?](https://linux22.com/image/840760/%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E4%BC%9A%E6%94%B6%E5%88%B0%E9%94%99%E8%AF%AF%20101%EF%BC%9F%E8%BF%99%E4%B8%8E%E6%88%91%E7%9A%84%20DNS%20%E6%9C%89%E5%85%B3%E5%90%97%EF%BC%9F.png)
我收到了Update information is outdated
警报。我尝试了一下sudo apt-get update
,但出现了以下错误:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/Release.gpg Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://repository.spotify.com/dists/stable/Release.gpg Something wicked happened resolving 'repository.spotify.com:http' (-11 - System error)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/i18n/Translation-en_IN Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/i18n/Translation-en Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/multiverse/i18n/Translation-en_IN Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/multiverse/i18n/Translation-en Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/restricted/i18n/Translation-en_IN Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/restricted/i18n/Translation-en Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/i18n/Translation-en_IN Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/i18n/Translation-en Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/source/Sources Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/source/Sources Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/multiverse/source/Sources Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/restricted/source/Sources Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/binary-i386/Packages Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/restricted/binary-i386/Packages Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/binary-i386/Packages Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/multiverse/binary-i386/Packages Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::13). - connect (101: Network is unreachable) [IP: 2001:67c:1562::13 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
我跟着这线程的最佳答案,它解决了该问题。
但有人能解释一下问题是什么以及如何解决吗?
答案1
如果您收到此类错误,则意味着您的 IPv6 连接不稳定,或者服务器已死,或者找不到文件。目前正在处理:
http://[2001:67c:1562::13]/ubuntu/dists/raring-security/multiverse/binary-i386/
答案2
输出中可以看到,您的计算机正在尝试使用 IPV6 地址(例如 2001:67c:1562::13 )进行连接,这些地址与 IPv4 地址(例如 192.168.0.1)不同。您可以采用两种方法。一种 - 禁用 IPv6,然后这些脚步:
使用任何文本编辑器打开你的
/etc/sysctl.conf
(你需要这样做sudo
)。我个人会这样做sudo nano /etc/sysctl.conf
(nano
最简单)或sudo vi /etc/sysctl.conf
。添加以下几行:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
运行
sudo sysctl --load
以应用更改。
第二种方法是暂时使用 ipv4 进行更新,而不是仅使用 ipv6 一次。
sudo apt-get -o Acquire::ForceIPv4=true update
第三种方法是使用 IPv6 DNS。例如,点击顶部面板中的网络指示器,选择Edit Connections
,然后针对您的特定 wifi 或以太网连接使用2620:0:ccc::2
dns,它OpenDNS IPv6 服务器。请确保选择“仅地址”选项
答案3
更改您的网络代理设置,使其与您用于访问此网页的代理设置同步(简称您的浏览器代理)