红联Linux门户
Linux帮助

Ubuntu上pip安装uwsgi失败的原因之一(未联网)

发布时间:2017-05-10 10:52:48来源:linux网站作者:羊小羚
ubuntu@ubuntu:~$ sudo pip install uwsgi
报错:
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory.If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory.If executing pip with sudo, you may want sudo's -H flag.
Collecting uwsgi
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb662edcc>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/uwsgi/
Could not find a version that satisfies the requirement uwsgi (from versions: )
No matching distribution found for uwsgi
 
报错原因:未联网,网络连接设置为了桥接模式,需要把其改为NAT模式,共享主机的IP地址。
 
附上修改方法:
虚拟机安装ubuntu上网的设置方法,分为主机有线上网和无线上网。
一、有线上网。
首先完全关闭ubuntu。
打开虚拟机,找到unbutu,右键“设置”,如图所示。
Ubuntu上pip安装uwsgi失败的原因之一(未联网)
然后点“网络适配器”,如图所示。
Ubuntu上pip安装uwsgi失败的原因之一(未联网)
如果没有设置过,默认的是NAT,点击确定即可。
二、主机无线上网。
同样是首先完全关闭ubuntu。
还是找到unbutu,右键“设置”找到“网络适配器”,如图所示。
Ubuntu上pip安装uwsgi失败的原因之一(未联网)
然后勾选“桥接模式”确定即可,如图所示。
Ubuntu上pip安装uwsgi失败的原因之一(未联网)
最后打开ubuntu,已经可以上网了。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/30663.html