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?
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?
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.
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
0% [Connecting to archive.ubuntu.com (2001:67c:1562::19)]^C – Erec O'idea Aug 25 '17 at 10:01