错误 101:尝试更新时无法连接网络

错误 101:尝试更新时无法连接网络

我的 ubuntu 浏览这个通常无法访问任何网站,apt-get update甚至upgrade出现如下所示的错误,这可能是什么?

sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [94,5 kB]
Hit:2 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease
Err:3 http://br.archive.ubuntu.com/ubuntu xenial InRelease                     
  Cannot initiate the connection to br.archive.ubuntu.com:80 (2801:82:80ff:8000::5). - connect (101: Network is unreachable) [IP: 2801:82:80ff:8000::5 80]
Err:4 http://br.archive.ubuntu.com/ubuntu xenial-updates InRelease
  Cannot initiate the connection to br.archive.ubuntu.com:80 (2801:82:80ff:8000::5). - connect (101: Network is unreachable) [IP: 2801:82:80ff:8000::5 80]
Err:5 http://br.archive.ubuntu.com/ubuntu xenial-backports InRelease
  Cannot initiate the connection to br.archive.ubuntu.com:80 (2801:82:80ff:8000::5). - connect (101: Network is unreachable) [IP: 2801:82:80ff:8000::5 80]
Downloading 94,5 kB in 2min 0s (786 B/s)
Reading package lists ... Done
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Cannot initiate the connection to br.archive.ubuntu.com:80 (2801:82:80ff:8000::5). - connect (101: Network is unreachable) [IP: 2801:82:80ff:8000::5 80]
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Cannot initiate the connection to br.archive.ubuntu.com:80 (2801:82:80ff:8000::5). - connect (101: Network is unreachable) [IP: 2801:82:80ff:8000::5 80]
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Cannot initiate the connection to br.archive.ubuntu.com:80 (2801:82:80ff:8000::5). - connect (101: Network is unreachable) [IP: 2801:82:80ff:8000::5 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

乌本图:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

答案1

您是否尝试过将存储库更改为“主服务器”?

您可以通过打开“软件和更新”并选择不同的镜像来更改它。

有时本地存储库镜像会出现故障,因此检查其他镜像总是一个好主意;)

我还注意到它正在尝试通过 IPv6 进行连接,而你的路由器或 ISP 可能不支持。你试过

答案2

从日志来看,您的机器似乎正在使用 IPv6 连接到互联网。可能是您的互联网服务提供商不支持 IPv6。您可以尝试禁用 IPv6。

要在整个系统内执行此操作,请编辑文件/etc/default/grub(例如使用sudo nano /etc/default/grub),并添加ipv6.disable=1的值GRUB_CMDLINE_LINUX_DEFAULT

在默认的 Ubuntu 安装中,该行内容为

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

所以你把它改成

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable"

之后,首先运行sudo update-grub,然后重新启动。

相关内容