Centos7 安装uwsgi失败
centos7 安装uwsgi失败
失败过程
我是Centos 直接安装没有其他操作
按照网上部署部署uwsgi+nginx+django 教程
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
安装Python包管理
easy_install 包 https://pypi.python.org/pypi/distribute
安装步骤:
1 | > cd ~ wget |
发现没有自带没有安装 pip yum了pip
之后
使用pip安装
pip install uwsgi
报错一直没有解决
错误代码
ERROR: Command “/usr/bin/python2 -u -c ‘import setuptools, tokenize;file=’”’”’/tmp/pip-install-WeDbCr/uwsgi/setup.py’”’”’;f=getattr(tokenize, ‘“’”‘open’”’”’, open)(file);code=f.read().replace(’”’”’\r\n’”’”’, ‘“’”’\n’”’”’);f.close();exec(compile(code, file, ‘“’”‘exec’”’”’))’ install --record /tmp/pip-record-ySrxMo/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-install-WeDbCr/uwsgi/
解决方案
- 使用python3 安装uwsgi
- 在centos自带的Python2下 必须同时安装“编译工具”和“python-devel”
第二种方法代码
三步
1安装编译工具
1 | yum install -y gcc* pcre-devel openssl-devel |
正确截图
2安装python依赖
1 | yum install -y python-devel |
正确截图
2安装uwsgi
1 | pip install uwsgi |
正确截图
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Zeo's Security Lab!