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

到此结束。

centos python environment的更多相关文章

  1. docker部署项目: centos+python+redis+mysql+uwsgi+nginx

    一.Centos7安装docker 1.1 环境配置 先测试是否下载了docker:查看镜像:docker images没有下载,就依次执行以下环境的安装 ①curl http://mirrors.a ...

  2. Prepare Python environment and install selenium.

    1, Install python and selenium. I use python 3.5, the following is the example 1.)    Python downloa ...

  3. Linux CentOS Python开发环境搭建教程

      CentOS安装Python 1.CentOS已经自带安装了2.x版本,先尝试python命令检查已安装的版本.如果你使用rpm.yum或deb命令安装过,请使用相对命令查询. 2.复制安装文件链 ...

  4. CentOS Python 安装MySQL-python

    一.安装mysql yum list | grep mysql >>yum install -y mysql-server mysql mysql-devel CentOS 7的yum源中 ...

  5. centos python版本升级到3.x

    Linux(CentOS)下将Python的版本升级为3.6.2的方法 1.检查确认系统的相关信息 查看内核版本[root@zstest1 ~]# cat /etc/redhat-release Ce ...

  6. A Python Environment Detector

    The user provide the method to get result(command on remote host), the check standard(a callback fun ...

  7. 升级Centos的python为2.7(centos python 升级)

    1.首先下载python的2.7.8版本的tar包.为什么没有选择最新版本的3.4呢?因为3版本的兼容性不好.很多一些成熟的项目都是基于2.7开发的. https://www.python.org/d ...

  8. Centos python 2.6 升级到2.7.3

    wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 sudo make all sudo mak install sudo mak ...

  9. centos python 2.7 安装

    一开始有这个需求,是因为用 YaH3C 替代 iNode 进行校园网认证时,一直编译错误,提示找不到 Python 的某个模块,百度了一下,此模块是在 Python2.7 以上才有的,但是系统的自带的 ...

随机推荐

  1. 「CF 961G」Partitions

    题目链接 戳我 \(Solution\) 首先,这个直接推式子.自己推去 所以我们来想一想一些巧妙的方法 \(|S|\sum w_i\) 可以转化为:划分好集合后,每个点都对当前点有\(w_i\)的贡 ...

  2. idea为项目添加ignore文件忽略unversion的文件

    最近初学Git,而且在使用的IDE是IntelliJ IDEA,发现IDEA在提交项目到本地仓库的时候,会把.idea文件夹中的内容也提交上去,这里面放的是一些项目的配置信息,包括历史记录,版本控制信 ...

  3. async/await 真不是你想象中那么简单

    先上代码 公共代码 function getData(data, time) { return new Promise(function (resolve, reject) { setTimeout( ...

  4. C++入门经典-例3.2-根据分数判断是否优秀

    1:代码如下: // 3.2.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <iostream> using ...

  5. 选题 Scrum立会报告+燃尽图 02

    此作业要求参见[https://edu.cnblogs.com/campus/nenu/2019fall/homework/8683] 一.小组介绍 组长:贺敬文 组员:彭思雨 王志文 位军营 杨萍 ...

  6. sudo密码一直出错

    Linux默认是没有将用户添加到sudoers列表中的,需要root手动将账户添加到sudoers列表中,才能让普通账户执行sudo命令. 所以要将用户添加到sudoers组中,才能执行sudo命令, ...

  7. 如何在外部获取当前A标签的ID值

    <div class="diskmain"> <ul id="folder"> <li><span class='do ...

  8. SpringBoot整合kafka(安装)

    项目路径:https://github.com/zhaopeng01/springboot-study/tree/master/study_14 序言 Kafka 是一种高吞吐的分布式发布订阅消息系统 ...

  9. spark streaming 1: SparkContex

    StreamingContext 和SparkContex的用途是差不多的,作为spark stream的入口,提供配置.生成DStream等功能. 总体来看,spark stream包括如下模块: ...

  10. 使用ajax获取servelt数据乱码

    修改tomcat编码 <Connector port="8080" protocol="HTTP/1.1" connectionTimeout=" ...