sudo apt-get update 的问题

sudo apt-get update 的问题

我在代理后面。每次执行 apt-get update 命令时,这都是屏幕上的输出

Err http://extras.ubuntu.com trusty InRelease

Err http://extras.ubuntu.com trusty Release.gpg                                
  Unable to connect to extras.ubuntu.com:http:
Err http://security.ubuntu.com trusty-security InRelease                       

Err http://security.ubuntu.com trusty-security Release.gpg                     
  Unable to connect to security.ubuntu.com:http: [IP: 91.189.91.15 80]
Err http://in.archive.ubuntu.com trusty InRelease       

Err http://in.archive.ubuntu.com trusty-updates InRelease

Err http://in.archive.ubuntu.com trusty-backports InRelease

Err http://in.archive.ubuntu.com trusty Release.gpg     
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]
Err http://in.archive.ubuntu.com trusty-updates Release.gpg
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]
Err http://in.archive.ubuntu.com trusty-backports Release.gpg
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]
Reading package lists... Done
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/InRelease  

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease  

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease  

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Unable to connect to extras.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Unable to connect to security.ubuntu.com:http: [IP: 91.189.91.15 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.

对所有服务器的 ping 操作都正常,我已禁用 ipv6 地址。似乎没什么作用。谁能帮我

答案1

Ubuntu 和 debian 系统。

添加:

Acquire::http::Proxy "http://yourproxyaddress:proxyport";

提交至文件:

/etc/apt/apt.conf

这是该文件中的唯一条目,我的系统代理变量为空。

http_proxy
https_proxy
HTTP_PROXY
HTTPS_PROXY

其他解决方法:

  1. 在获取行中使用 IP 地址而不是 FQDN。
  2. 将代理信息添加到浏览器,测试代理
  3. http 与 https 代理
  4. 代理是否需要授权

相关内容