Zach Adams Web Developer and Programmer

Apt-get can't connect to ''

January 15, 2015

Ran into this issue today where on a newly made Linode Ubunu 14.04 LTS server I ran

apt-get update

The command started alright however eventually it would reach a point where it got stuck at

Connecting to (2001:67c:1562::16)

And wouldn’t continue no matter what. Turns out this is an issue where connecting over IPv6 on some servers causes them to get stuck at this point. The fix is really simple.

OpenĀ /etc/gai.conf

Uncomment the following line:

# For sites which prefer IPv4 connections change the last line to
precedence ::ffff:0:0/96 100

This will allow you to still use IPv6 but sets IPv4 as the precedence so that apt-get won’t get stuck.

Let me know if you have any issues!


RedEight says:
January 22nd 2015 at 12:00am
Thank you! I'm really confused as to why this issue showed up. Fortunately this was able to get me back up and running on updates. Seems kind of bizarre that this would suddenly become an issue.
Forrest says:
August 8th 2015 at 12:00am
Thanks! This worked on Mint 17.1

Leave a Reply

Your email address will not be published. Required fields are marked *