Ubuntu 20.04 上配置代理的问题

Ubuntu 20.04 上配置代理的问题

我在代理后面工作,我试图从终端用 pip 安装一个 python 包,但它显示以下错误(我试图用它安装 electronjs,npm但它也给我网络错误):

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fed4cdc32e0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/virtualenv/

我使用cntlm网络选项并进行了以下配置:

网络配置

我编辑了/etc/environment/etc/apt/apt.conf文件如下:

$ cat /etc/environment
http_proxy="http://127.0.0.1:3128/"
https_proxy="http://127.0.0.1:3128/"
ftp_proxy="http://127.0.0.1:3128/"
$ cat /etc/apt/apt.conf
Acquire::http::Proxy "http://127.0.0.1:3128";
Acquire::https::Proxy "http://127.0.0.1:3128";
Acquire::ftp::Proxy "http://127.0.0.1:3128";

相关内容