12

My ubuntu browsing this normally can not access any site, more apt-get update and even upgrade this giving error as shown below, what could it be?

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.

Ubuntu:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
karel
  • 114,770
  • Just in case someone has similar problem - in my case, there was a problem with my network. I did have internet access, but the adapter was not configured properly. Once I switched to wifi adapter, the apt update ran smoothly. – Nazar Mar 14 '21 at 22:33

2 Answers2

10

Have you tried changing the repository to the 'Main server'?

You can change it by opening 'Software & Updates' and selecting a different mirror.

From time to time the local repository mirrors go down so its always a good idea to check other ones ;)

I have also noticed that it is trying to connect via IPv6 which your router or ISP may not support. Have you tried this?

Aedazan
  • 302
3

From the logs it seems that your machine is using IPv6 to connect to the internet. It could be that your internet service provider does not support IPv6. You can try disabling IPv6.

To do this system-wide, edit the file /etc/default/grub (for instance using sudo nano /etc/default/grub), and adding ipv6.disable=1 to the value of GRUB_CMDLINE_LINUX_DEFAULT.

In a default Ubuntu installation that line reads

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

so you change it to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable"

Afterwards, first run sudo update-grub, then reboot.

zwets
  • 12,354