您的位置:首页 > 其它

Apt-get can't connect to 'security.ubuntu.com'

2016-06-24 09:14 281 查看
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 security.ubuntu.com (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!

Categories:
Quick
FixTags:
apt-get,linux,server,Xubuntu
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: