ubuntu apt-get 不使用代理 我想问一下,在ubuntu中,使用apt-get安装软件时,怎么取消代理呢?

2024-11-30 16:58:42
推荐回答(1个)
回答1:

那你很可能是配置文件里设置了代理,比如设置了8000端口的代理,sudo gedit /etc/apt/apt.conf,显示:
Acquire::http::proxy "http://127.0.0.1:8000/";
Acquire::ftp::proxy "ftp://127.0.0.1:8000/";
Acquire::https::proxy "https://127.0.0.1:8000/";
删掉即可。
如何你要临时使用代理则用:sudo apt-get -o Acquire::http::proxy="http://127.0.0.1:8000/" update
注意:不能通过export直接设置http_proxy环境变量这种方式设置代理,这种方式子ubuntu10.04后就不能用了