Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to compile a c++ program in Fedora Linux, but the program isn't compiled correctly. I got the following error:

/bin/sh: g++: command not found
make[1]: [*.o] Error 127 
make[1]: Leaving directory


share|improve this question

2 Answers 2

It looks like you need to install g++. This is available via yum:

yum install gcc-c++

In the future, if you see any variant of a command not found error, you can search for the package that provides the "command" with

yum whatprovides <command>
share|improve this answer
You may also want to do sudo yum group install "Development Tools" –  hobs Nov 6 '14 at 15:33

The C++ compiler, g++, is either not installed or not available via the PATH environment variable.

Try installing the C++ compiler.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.