Ssu*_* Yu 3 updates apt networking google-chrome
我的 Ubuntu 是 14.04。
我尝试通过以下方式更新我的软件包:
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)
然后它卡在
100% [Connecting to dl.google.com (203.208.40.46)]
Run Code Online (Sandbox Code Playgroud)
几分钟。这很烦人。
我尝试为连接设置超时如何降低存储库更新的等待时间。
几秒钟后,它失败并结束该过程。
Err http://dl.google.com stable InRelease
Err http://dl.google.com stable Release.gpg
Cannot initiate the connection to dl.google.com:80 (2401:3800:4002:802::1005). - connect (101: Network is unreachable) [IP: 2401:3800:4002:802::1005 80]
Reading package lists... Done
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease
W: Failed to fetch http://build.openvpn.net/debian/openvpn/stable/dists/trusty/InRelease
W: Failed to fetch http://build.openvpn.net/debian/openvpn/stable/dists/trusty/Release.gpg Unable to connect to build.openvpn.net:http:
W: Failed to fetch http://ppa.launchpad.net/neovim-ppa/stable/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/neovim-ppa/stable/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg Cannot initiate the connection to dl.google.com:80 (2401:3800:4002:802::1005). - connect (101: Network is unreachable) [IP: 2401:3800:4002:802::1005 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Run Code Online (Sandbox Code Playgroud)
我的位置是中国。我有 Shadowsocks SOCKS5 系统代理和 OpenVPN 连接到同一个 VPS 服务器。我试过单独和一起关闭它们,但没有用。
我想知道为什么会发生这种情况,我该如何解决?
- -更新 - -
我可以下载@JonasCz 提供的。
当我遇到这个问题时,我在 Ubuntu 中禁用了 IPv6 并解决了问题,为此,请按照以下步骤操作:
要禁用 IPv6,您必须/etc/sysctl.conf使用任何文本编辑器打开并在末尾添加以下行:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Run Code Online (Sandbox Code Playgroud)
如果 IPv6 仍然启用,则问题sysctl.conf是仍未激活。
在这种情况下,打开一个终端(Ctrl+ Alt+ T)和输入命令:
sudo sysctl -p
Run Code Online (Sandbox Code Playgroud)
输出将与以下 3 行非常相似:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Run Code Online (Sandbox Code Playgroud)
之后,执行:
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
Run Code Online (Sandbox Code Playgroud)
如果您1在输出中看到,则 IPv6 已成功禁用。
1
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助。
| 归档时间: |
|
| 查看次数: |
9466 次 |
| 最近记录: |