Problem: When using apt-get update, always stuck @ following conditions:

[Waiting for headers]


[Waiting for headers] [Connecting to (2001:67c:1360:8001

Solution 1:

Such problem could happen when ipv6 is enabled while software source doesn’t support. We can force apt-get use ipv4 method to download by using command as followed:

sudo apt-get -o Acquire::ForceIPv4=true update

Solution 2:

Such problem could happen when previous software sources have been updated partially, when being too eager to press Ctrl+C, can cause integrity problems. Such problems could be solved by using:

sudo rm -r /var/lib/apt/lists/
sudo rm -r /var/lib/apt/lists/partial/

Solution 3:

By removing all useless or expired software sources, PPAs, and anything else.