[Ubuntu] 0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::17)]

在Ubuntu中进行sudo apt update的时候,常会出现情况: 0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::17)]

解决方案:

修改并支持IPV6网络:

在shell中输入命令:

sudo gedit /etc/gai.conf

就会出现:

#precedence  ::1/128       50
#precedence  ::/0          40
#precedence  2002::/16     30
#precedence ::/96          20
#precedence ::ffff:0:0/96  10
#
#    For sites which prefer IPv4 connections change the last line to
#
#precedence ::ffff:0:0/96  100

#
# scopev4    

然后查找字符串 "precedence :: ffff:0:0/96    100",将它前面的注释去掉,保存收工

#precedence  ::1/128       50
#precedence  ::/0          40
#precedence  2002::/16     30
#precedence ::/96          20
#precedence ::ffff:0:0/96  10
#
#    For sites which prefer IPv4 connections change the last line to
#
#precedence ::ffff:0:0/96  100
precedence ::ffff:0:0/96  100

#
# scopev4    

 

你可能感兴趣的:([Ubuntu] 0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::17)])