zoukankan      html  css  js  c++  java
  • Ubuntu上pip安装uwsgi失败的原因之一(未联网)

    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上网的设置方法,分为主机有线上网和无线上网。

    一、有线上网。

    1. 首先完全关闭ubuntu。

    2. 打开虚拟机,找到unbutu,右键“设置”,如图所示。

    3. 然后点“网络适配器”,如图所示。

    4. 如果没有设置过,默认的是NAT,点击确定即可。

    二、主机无线上网。

    1. 同样是首先完全关闭ubuntu。

    2. 还是找到unbutu,右键“设置”找到“网络适配器”,如图所示。

    3. 然后勾选“桥接模式”确定即可,如图所示。

    4. 最后打开ubuntu,已经可以上网了。

  • 相关阅读:
    Redis键是如何过期删除的
    使用EventBus + Redis发布订阅模式提升业务执行性能(下)
    使用EventBus + Redis发布订阅模式提升业务执行性能
    使用C#的计时器加观察者模式完成报警推送需求
    Go 语言入门教程:变量
    Go 语言入门教程:安装
    Docker 入门:Dockerfile
    Docker 入门:容器
    Docker 入门:什么是 Docker ?
    Windows 系统如何安装 Docker
  • 原文地址:https://www.cnblogs.com/yangxiaoling/p/6830506.html
Copyright © 2011-2022 走看看