nova docker 安装中的代理错误
Proxy Error in nova docker installation
当我从 github
存储库安装 nova-docker
时,它会运行 setup.py
;从该脚本下载并安装了一些软件包,但之后它在安装过程中引发了 ProxyError
。
Downloading unittest2-1.0.1-py2.py3-none-any.whl (95kB): 95kB downloaded
Downloading/unpacking linecache2 (from traceback2->testtools>=0.9.22->fixtures>=0.3.14->oslo.concurrency>=0.1.0)
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 298, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/site-packages/pip/req.py", line 1202, in prepare_files
do_download,
File "/usr/lib/python2.7/site-packages/pip/req.py", line 1380, in unpack_url
self.session,
File "/usr/lib/python2.7/site-packages/pip/download.py", line 546, in unpack_http_url
resp = session.get(target_url, stream=True)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 468, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/site-packages/pip/download.py", line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 378, in send
raise ProxyError(e)
ProxyError: ('Cannot connect to proxy.', gaierror(-2, 'Name or service not known'))
Storing debug log for failure in /root/.pip/pip.log
error: /bin/python -m pip.__init__ install 'pbr>=0.5.21,<1.0' 'Babel>=1.3' 'six>=1.7.0' 'oslo.serialization>=1.0.0 # Apache-2.0' 'oslo.utils>=1.0.0 # Apache-2.0' 'oslo.config>=1.4.0 # Apache-2.0' 'oslo.concurrency>=0.1.0 # Apache-2.0' 'docker-py>=0.5.1' returned 2
将代理设置放在centos的bash文件中。
出口http_proxy="http://PROXY=USERNAME=HERE:PROXY=PASSWORD=HERE@URL:PORT"
出口https_proxy="https://PROXY=USERNAME=HERE:PROXY=PASSWORD=HERE@URL:PORT"
出口ftp_proxy="ftp://PROXY=USERNAME=HERE:PROXY=PASSWORD=HERE@URL:PORT"
当我从 github
存储库安装 nova-docker
时,它会运行 setup.py
;从该脚本下载并安装了一些软件包,但之后它在安装过程中引发了 ProxyError
。
Downloading unittest2-1.0.1-py2.py3-none-any.whl (95kB): 95kB downloaded
Downloading/unpacking linecache2 (from traceback2->testtools>=0.9.22->fixtures>=0.3.14->oslo.concurrency>=0.1.0)
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 298, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/site-packages/pip/req.py", line 1202, in prepare_files
do_download,
File "/usr/lib/python2.7/site-packages/pip/req.py", line 1380, in unpack_url
self.session,
File "/usr/lib/python2.7/site-packages/pip/download.py", line 546, in unpack_http_url
resp = session.get(target_url, stream=True)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 468, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/site-packages/pip/download.py", line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 378, in send
raise ProxyError(e)
ProxyError: ('Cannot connect to proxy.', gaierror(-2, 'Name or service not known'))
Storing debug log for failure in /root/.pip/pip.log
error: /bin/python -m pip.__init__ install 'pbr>=0.5.21,<1.0' 'Babel>=1.3' 'six>=1.7.0' 'oslo.serialization>=1.0.0 # Apache-2.0' 'oslo.utils>=1.0.0 # Apache-2.0' 'oslo.config>=1.4.0 # Apache-2.0' 'oslo.concurrency>=0.1.0 # Apache-2.0' 'docker-py>=0.5.1' returned 2
将代理设置放在centos的bash文件中。
出口http_proxy="http://PROXY=USERNAME=HERE:PROXY=PASSWORD=HERE@URL:PORT"
出口https_proxy="https://PROXY=USERNAME=HERE:PROXY=PASSWORD=HERE@URL:PORT"
出口ftp_proxy="ftp://PROXY=USERNAME=HERE:PROXY=PASSWORD=HERE@URL:PORT"