![$ sudo apt-get update 期间出现“连接失败”](https://linux22.com/image/863975/%24%20sudo%20apt-get%20update%20%E6%9C%9F%E9%97%B4%E5%87%BA%E7%8E%B0%E2%80%9C%E8%BF%9E%E6%8E%A5%E5%A4%B1%E8%B4%A5%E2%80%9D.png)
何时执行
$ 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 命令