Search code examples
ubuntudarkflow

gcc-7: g++-7: No such file or directory


I am running setup.py to compile darkflow. When i run the command yum install gcc-python3-plugin , i always hit into the following errors, i have gcc & g++-7 installed

Error

running build_ext building 'darkflow.cython_utils.nms' extension gcc-7 CXX=g++-7 -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g
-fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c darkflow/cython_utils/nms.c -o build/temp.linux-x86_64-3.6/darkflow/cython_utils/nms.o gcc-7: error: CXX=g++-7: No such file or directory error: command 'gcc-7' failed with exit status 1

When i run my python

ubuntu@host1 # python3
Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Anyone know what causes the error? Thank you.


Solution

  • Late answer, but maybe this could help someone

    gcc-7 and g++-7 are different things. GCC is a collection of compilers (GNU Compiler Collection), while g++ is a compiler for c++, it is included in gcc. You say you have installed gcc and g++-7, but error says that it couldn't find gcc-7 so try to install gcc-7.