我在代理后面工作,我试图从终端用 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";