在安装模型脚本所需依赖时,报错如下内容:
INFO: g++: lap/_lapjv.cpp
INFO: g++: lap/lapjv.cpp
INFO: g++: lap/lapmod.cpp
[Errno 2] No such file or directory: 'g++'
[Errno 2] No such file or directory: 'g++'
[Errno 2] No such file or directory: 'g++'
error: Command "g++ -pthread -Wno-unused-result -Wsign-compare -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 -I/opt/rh/rh-python38/root/usr/include -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 -I/opt/rh/rh-python38/root/usr/include -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 -I/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/numpy/core/include -Ilap -I/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.8/numpy/distutils/include -I/opt/rh/rh-python38/root/usr/include/python3.8 -c lap/_lapjv.cpp -o build/temp.linux-x86_64-3.8/lap/_lapjv.o -MMD -MF build/temp.linux-x86_64-3.8/lap/_lapjv.o.d -msse -msse2 -msse3" failed with exit status 127
INFO:
########### EXT COMPILER OPTIMIZATION ###########
INFO: Platform :
Architecture: x64
Compiler : gcc
CPU baseline :
Requested : 'min'
Enabled : SSE SSE2 SSE3
Flags : -msse -msse2 -msse3
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2
Generated : none
INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /tmp/pip-install-g_5getnx/lap/build/temp.linux-x86_64-3.8/ccompiler_opt_cache_ext.py
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/rh/rh-python38/root/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g_5getnx/lap/setup.py'"'"'; __file__='"'"'/tmp/pip-install-g_5getnx/lap/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-x53ytvwn/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
解决办法
yum -y install gcc-c++