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

    到此结束。 

  • 相关阅读:
    浅谈动态开点线段树
    详解二叉查找树(BST)
    数组的随机打乱
    浅谈迭代加深搜索
    浅谈传递闭包问题
    详解权值线段树
    算法竞赛中桶的概念与应用
    NKOJ 1353 图形面积
    并查集 & 最小生成树详细讲解
    【线段树基础】NKOJ 1321 数列操作
  • 原文地址:https://www.cnblogs.com/tangkaixin/p/6808528.html
Copyright © 2011-2022 走看看