Centos

ssh root@118.24.33.49

如果使用make命令出现
configure: error: no acceptable C compiler found in $PATH 问题
原因是因为缺少gcc套件

解决办法:
yum install gcc

1.新建一个用于安装python3的目录

mkdir /usr/local/python3

2.下载,编译,安装。

cd /usr/local/python3

wget https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tgz

tar -xvf Python-3.5.4.tgz

cd Python-3.5.4/

指定安装目录: ./configure --prefix=/usr/local/python3Dir

make

make install

3.建立软连接:

ln -s /usr/local/python3Dir/bin/python3 /usr/bin/python3

4.测试
python
python3

安装pip3

yum install python34-setuptools

easy_install-3.4 pip

之后就可以使用pip3了

2.安装uwsgi

报错: Could not find a version that satisfies the requirement uwsgi (from versions: )
No matching distribution found for uwsgi

使用如下安装命令:
sudo pip install http://projects.unbit.it/downloads/uwsgi-lts.tar.gz

会出现如下问题:
致命错误:Python.h:没有那个文件或目录

include <Python.h>

因为缺少Python.h

解决:
安装Python-dev,但是在centos上面没有该包

yum install python-devel

安装过程中可能会提示:

错误:python-devel conflicts with python-2.7.5-48.el7.x86_64

要解决上述问题,可以这样:

首先安装 yum-utils 套件

yum install yum-utils

执行 clean duplicate package

package-cleanup --cleandupes

删除软连接:rm -rf ./test_chk_ln

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容