[Solved] CentOS7 failed to install psutil: module command’gcc’ failed with exit status 1

CentOS install psutil package:
python version: 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
An error is reported when executing 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. Lack of gcc dependent environment Install gcc
yum -y install gcc
2. The python-devel package is missing
yum install python-devel -y
Summary: During the installation process, there may still be other environment dependent packages. The idea to solve —- what is missing to make up.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *