设置linux代理完成apt-get

最近ubuntu的服务器被公司关闭了外网使用权限,但是安装软件又需要连接外网,那么就只能通过代理来连接了。
先按照下面的这篇帖子来设置windows端的代理。
 
最后curl www.baidu.com能够有打印出来。
 
但是我sudo apt-get update时,仍然出现错误
 
Unsupported proxy configured: 127.0.0.1://18088
 
更换临时的命令:
 
sudo apt-get -o Acquire::http::proxy=" http://127.0.0.1:18088/" update
 
sudo apt-get -o Acquire::http::proxy=" http://127.0.0.1:18088/" install python3-pip
 
结果成功的安装了软件

猜你喜欢

转载自www.cnblogs.com/djw316/p/11493803.html
今日推荐