zoukankan      html  css  js  c++  java
  • centos python environment

    3.

    在Centos7的docker里装好了httpd,运行报错:

    $ systemctl start httpd.service  
    
    Failed to get D-Bus connection: Operation not permitted  

    真无语啊,必须提权才可以:

    $ docker run --privileged -d -p 5000:5000 centos /sbin/init

    2. 

    unable to execute gcc: No such file or directory
    error: command 'gcc' failed with exit status 1

    解决办法:

    yum install -y gcc python-devel libxslt-devel libffi-devel openssl-devel

    1.

    $ yum install -y python-pip
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: repo.virtualhosting.hk
     * extras: repo.virtualhosting.hk
     * updates: repo.virtualhosting.hk
    No package python-pip available.
    Error: Nothing to do

    解决办法:

    像centos这类衍生出来的发行版,他们的源有时候内容更新的比较滞后,或者说有时候一些扩展的源根本就没有。

    所以在使用yum来search  python-pip的时候,会说没有找到该软件包。因此为了能够安装这些包,需要先安装扩展源EPEL。

    EPEL(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。

    首先安装epel扩展源:

    sudo yum -y install epel-release

    然后安装python-pip 

    sudo yum -y install python-pip

    安装完之后别忘了清除一下cache

    sudo yum clean all

    到此结束。 

  • 相关阅读:
    Python中的函数介绍
    Python中对文件和目录的操作
    Centos7上vsftp脚本--> sh vsftp.sh 用户名 密码 --> sh vsftp.sh install
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '***' (2)
    re模块
    模块导入
    装饰器
    内置函数 Ⅱ
    内置函数 Ⅰ
    迭代器、生成器
  • 原文地址:https://www.cnblogs.com/tangkaixin/p/6808528.html
Copyright © 2011-2022 走看看