无法执行:apt-get update
我正在尝试执行“apt-get update”,其中系统花费很长时间而没有做任何事情。
Ubuntu的16.04
我可以ping google.com附加ifconfig显示ping响应
请指出我正确的方向
所有命令都以root用户身份运行
–apt-get update–
root@ravi-ubundu:/home/ravi# apt-get update 0% [Connecting to gb.archive.ubuntu.com (2001:67c:1560:8001::11)] [Connecting to security.ubuntu.com (2001:67c:1560:8001::11)]
–ifconfig–
root@ravi-ubundu:/home/ravi# ifconfig enp0s3 Link encap:Ethernet HWaddr 08:00:27:8d:de:f3 inet addr:192.168.0.155 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: 2a02:c7d:9bd9:0:61b1:4d00:dc9:8f14/64 Scope:Global inet6 addr: 2a02:c7d:9bd9:0:8f27:1145:2168:8c0d/64 Scope:Global inet6 addr: fdb0:6eb3:3be5:0:b5f0:b2d:55b1:6de5/64 Scope:Global inet6 addr: fdb0:6eb3:3be5:0:61b1:4d00:dc9:8f14/64 Scope:Global inet6 addr: 2a02:c7d:9bd9:0:f0ba:8d3d:befd:94ea/64 Scope:Global inet6 addr: fe80::3cdf:4b12:4371:2c3a/64 Scope:Link inet6 addr: fdb0:6eb3:3be5:0:5f08:c4d0:8e3d:59a/64 Scope:Global inet6 addr: 2a02:c7d:9bd9:0:b5f0:b2d:55b1:6de5/64 Scope:Global inet6 addr: fdb0:6eb3:3be5:0:aa18:5aa0:198:5ad0/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1274 errors:0 dropped:0 overruns:0 frame:0 TX packets:979 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:129718 (129.7 KB) TX bytes:154341 (154.3 KB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:302 errors:0 dropped:0 overruns:0 frame:0 TX packets:302 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:24015 (24.0 KB) TX bytes:24015 (24.0 KB) root@ravi-ubundu:/home/ravi# ping google.co.uk PING google.co.uk (216.58.204.35) 56(84) bytes of data. 64 bytes from lhr25s12-in-f3.1e100.net (216.58.204.35): icmp_seq=1 ttl=57 time=19.3 ms 64 bytes from lhr25s12-in-f3.1e100.net (216.58.204.35): icmp_seq=2 ttl=57 time=18.1 ms 64 bytes from lhr25s12-in-f3.1e100.net (216.58.204.35): icmp_seq=3 ttl=57 time=22.1 ms ^C
您的系统遇到IPv6
设置问题。 你可以用以下方法禁用它:
$ sudo nano /etc/sysctl.conf
附加:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
运行此命令:
$ sudo sysctl -p
详情请访问: https : //help.ubuntu.com/community/WebBrowsingSlowIPv6IPv4
将来,如果您希望重新启用IPv6
只需从/etc/syst.conf
文件中删除附加的行。