When running the apt-get update
command, the process 'hangs' when checking security.ubuntu.com
endpoints.
This is apparantely due to an issue some sites face when trying to connect over IPv6 and whilst it is assumed that this will be
fixed at some point in the future (sooner rather than later judging by the transition to IPv6 by most), the fix below resolves
this issue, allowing the update process to complete successfully.
Edit /etc/gai.conf
and uncomment the following line: precedence ::ffff:0:0/96 100
. This is found directly under this
comment: # For sites which prefer IPv4 connections change the last line to
Re-run apt-get update
after saving the gai.conf
file and you'll see the process complete successfully. All we've done is to
all IPv4 connections for sites which prefer this connection protocol for now and seeing as the public web is still running
across IPv4, this is OK to do for now!
It worked by modifying the file. Why does it stopped working prior to this, any idea?