ubuntu 16.04 apt-get update 出錯解決辦法

0% [Connecting to security.ubuntu.com (2001:67c:1562::15)]ubuntu

[Connecting to archive.canonical.com (2001:67c:1360:8c01::16)]this

出現這種一直卡在那得狀況解決辦法code

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.server

Open /etc/gai.confget

Uncomment the following line:it

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

去掉#io

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.ast

相關文章
相關標籤/搜索