0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::17)]

9,872

Solution 1

It looks like the computer believes it has IPv6-connectivity, whilst it in fact does not have it. This can be verified by trying the command ping6 www.google.com.

You can disable IPv6 on Ubuntu, by running the following command. To enable IPv6 again,simply do rm /etc/sysctl.d/99-disable-ipv6.conf

echo "net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee /etc/sysctl.d/99-disable-ipv6.conf

You can also create this file, using a text editor, and pasting the content

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Then run sudo service procps reload to reload.

Solution 2

I had this issue, but was solved instantly by following the steps below:

a) open terminal and run the command sudo nano /etc/gai.conf

b) Scroll down in the file gai.conf using the arrow keys and remove the comment(#) from the line: #precedence ::ffff:0:0/96 100

Save the file by pressing Ctrl+O and then exit by pressing Ctrl+X

Share:
9,872

Related videos on Youtube

Erec O'idea
Author by

Erec O'idea

Updated on September 18, 2022

Comments

  • Erec O'idea
    Erec O'idea over 1 year

    When I run sudo apt-get update, it gets stuck at Connecting to ...

    $ sudo apt-get update
    0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::17)]
    

    That's all the command outputs. Does anyone know what's wrong?

  • Erec O'idea
    Erec O'idea over 6 years
    It works temporarily when i run the commands but does the same thing after i reboot. So i added the script and now i'm getting this. Hit:1 ppa.launchpad.net/hvr/ghc/ubuntu xenial InRelease 0% [Connecting to archive.ubuntu.com (2001:67c:1562::19)]^C
  • Erec O'idea
    Erec O'idea over 6 years
    Rebooted it today seem to be working. Thank you.
  • Charles Green
    Charles Green about 5 years
    Although not required, it helps sometimes to explain why this works: Your network is not responding well to IPV6 addresses (my ISP does not use IPV6 at all, and I'm near Seattle). This line gives precedence to IPV4 addresses in GetAdrressInfo.
  • Alexandr S.
    Alexandr S. about 3 years
    Thank you! Works great!