ubuntu 16.04 apt-get update 出错解决办法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu 16.04 apt-get update 出错解决办法相关的知识,希望对你有一定的参考价值。

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

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

出现这种一直卡在那得情况解决办法

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

去掉#

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.

以上是关于ubuntu 16.04 apt-get update 出错解决办法的主要内容,如果未能解决你的问题,请参考以下文章

Restore Apt-get In Ubuntu16.04

我在 Ubuntu 16.04 上运行 apt-get update 时无法解决“代理”错误

ubuntu 16.04 apt-get update 出错解决办法

How To Install Java with Apt-Get on Ubuntu 16.04

Ubuntu-16.04下Docker通过阿里云镜像安装(apt-get)

ubuntu 16.04 apt-get 更新使用清华镜像源