我对 Ubuntu 还很陌生。我也使用了安全代理。当我尝试运行时,sudo apt-get update
出现以下错误。
blah@blah-hp-15-notebook-pc:~$ sudo apt-get update
Err http://security.ubuntu.com vivid-security InRelease
Err http://in.archive.ubuntu.com vivid InRelease
Err http://security.ubuntu.com vivid-security Release.gpg
Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8c01::18). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::18 80]
Err http://in.archive.ubuntu.com vivid-updates InRelease
Err http://in.archive.ubuntu.com vivid-backports InRelease
Err http://in.archive.ubuntu.com vivid Release.gpg
Cannot initiate the connection to in.archive.ubuntu.com:80 (2001:67c:1360:8c01::18). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::18 80]
Err http://in.archive.ubuntu.com vivid-updates Release.gpg
Cannot initiate the connection to in.archive.ubuntu.com:80 (2001:67c:1360:8c01::18). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::18 80]
Err http://in.archive.ubuntu.com vivid-backports Release.gpg
Cannot initiate the connection to in.archive.ubuntu.com:80 (2001:67c:1360:8c01::18). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::18 80]
Reading package lists... Done
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/vivid/InRelease
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/vivid-updates/InRelease
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/vivid-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/vivid-security/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/vivid-security/Release.gpg Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8c01::18). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::18 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/vivid/Release.gpg Cannot initiate the connection to in.archive.ubuntu.com:80 (2001:67c:1360:8c01::18). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::18 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/vivid-updates/Release.gpg Cannot initiate the connection to in.archive.ubuntu.com:80 (2001:67c:1360:8c01::18). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::18 80]
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/vivid-backports/Release.gpg Cannot initiate the connection to in.archive.ubuntu.com:80 (2001:67c:1360:8c01::18). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::18 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
有人知道如何开始修复它吗?
答案1
答案2
您可以在以下位置添加代理设置/etc/apt/apt.conf文件;
echo "Acquire::http::proxy \"http://<proxy_server>:<port>/\";" >> /etc/apt/apt.conf
echo "Acquire::https::proxy \"https://<proxy_server>:<port>/\";" >> /etc/apt/apt.conf
之后,您可以尝试;
sudo apt-get update
答案3
可能是你的网络连接有问题。我遇到了同样的问题,然后连接到另一个 wifi,问题就解决了
答案4
我也遇到过这个问题。对我来说,这是一个与网络相关的问题,缺少默认网关配置。添加了默认网关以解决此问题