/bin/bash: g++: command not found error 127

44,135

You need the g++ compiler, not gcc, so install the g++ package, and maybe build-essential for any needed headers:

sudo apt-get install g++

And if necessary (probably not for this package):

sudo apt-get install build-essential

You should read the README file(s), then the INSTALL file and follow the instructions. They usually boil down to running configure:

./configure

Then running make:

make

Then, if you want to install the programs in a system area, run:

sudo make install

The configure step should search out the necessary parts (g++) and complain and stop if necessary parts are not found. It builds the Makefile from the information about your system.

I had no issues with the downloaded package, but then again, I do have the build-essential package installed for what I do. g++ gets installed into /usr/bin, which should be a normal part of your PATH.

Share:
44,135

Related videos on Youtube

Jasmeen Patel
Author by

Jasmeen Patel

Updated on September 18, 2022

Comments

  • Jasmeen Patel
    Jasmeen Patel over 1 year

    I was trying to install the software quicknet from a tar.gz file. After running ./configure, when I tried running make, it showed the following error:

    g++ -I. -I.   -c QN_args.cc
    /bin/bash: g++: command not found
    make: *** [QN_args.o] Error 127
    

    I have already installed the gcc compiler.

  • Eliah Kagan
    Eliah Kagan about 6 years
    @JasmeenPatel ubfan1's instructions typically work for problems manifesting as you had described. So I think this question and answer are helping other people...but it's too bad this didn't enable you to fix your problem! You asked this over three years ago so my guess is that you either solved the problem or don't have quite the same problem compiling the software as you did back then. But if you are still looking for a solution to this same problem, then I definitely recommend that you edit your question with details on every step you took including where you obtained the .tar.gz file.