$ sudo apt-get update 期间出现“连接失败”

$ sudo apt-get update 期间出现“连接失败”

何时执行

$ sudo apt-get update 
Err http://security.ubuntu.com trusty-security/main Sources          
  Connection failed [IP: 91.189.92.201 80]
Err http://security.ubuntu.com trusty-security/restricted Sources              
  Connection failed [IP: 91.189.91.13 80]

答案1

如果您使用代理,请编辑或创建文件:/etc/apt/apt.conf

并插入您的代理设置:

Acquire::http::Proxy "http://<proxy_host>:<proxy_port>";

保存并重新启动 apt-get 命令

相关内容