CentOS7 安装psutil模块失败command 'gcc' failed with exit status 1
作者:互联网
CentOS安装psutil包:
python版本:3.6
wget https://pypi.python.org/packages/source/p/psutil/psutil-3.2.1.tar.gz --no-check-certificate
tar zxvf psutil-3.2.1.tar.gz
cd psutil-3.2.1
python setup.py install
执行python setup.py install时报错:
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_VERSION=321 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
unable to execute gcc: Not a directory
error: command 'gcc' failed with exit status 1
1、缺少gcc依赖环境 安装gcc
yum -y install gcc
2.缺少python-devel包
yum install python-devel -y
总结:安装过程中,可能仍存在其它的环境依赖包情况。解决的思路----缺啥补啥。
标签:status,gcc,SOURCE,python,failed,install,psutil,-- 来源: https://www.cnblogs.com/wanlipiao/p/14985873.html