1. 程式人生 > 其它 >CentOS7 安裝psutil模組失敗command 'gcc' failed with exit status 1

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包 yuminstallpython-devel-y 總結:安裝過程中,可能仍存在其它的環境依賴包情況。解決的思路----缺啥補啥。