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,已经可以上网了。

  • 相关阅读:
    《编程珠玑番外篇-O 中间语言和虚拟机漫谈》
    《编译原理之美》笔记——后端部分
    《编译原理之美》笔记——前端部分
    《从语言编译器源码入手,编译原理该这么学》
    知识图谱简介
    支持向量机原理讲解(一)
    一个完整的机器学习项目在Python中演练(四)
    多GPU使用详解
    数据可视化
    详解谱聚类原理
  • 原文地址:https://www.cnblogs.com/yangxiaoling/p/6830506.html
Copyright © 2011-2022 走看看