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,已經可以上網了。