If you’ve stumbled upon this post it probably means that you were trying to compile a C++ program using the linux make terminal command and ran into the following error:
> make: g++: Command not found
Or maybe the following one, depending on the Linux version and distribution you’re using:
> “/bin/sh: g++: command not found”
Luckily enough, the fix is really simple: all you have to do is to install GCC, the GNU Compiler Collection package, which enables full C++ compilation support for most modern Linux distributions (here’s the last changelog).
Here’s the command that will solve your issue for good:
> yum install gcc-c++
If you’re not running CentOS or another yum-based distribution, you can achieve the following results
> sudo apt update
> sudo apt install gcc
That’s it for now: happy building!