/bin/sh: g++: command not found

I want to install a software in SUSE 11.3,
I have installed patterns-openSUSE-devel_C_C++,make,cmake,and so on…
Some error occurred.

make[3]: Leaving directory /home/flakid/OpenFOAM/OpenFOAM-1.7.1/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc' make[2]: *** [dsmcFieldsCalc] Error 2 make[3]: Entering directory /home/flakid/OpenFOAM/OpenFOAM-1.7.1/applications/utilities/postProcessing/miscellaneous/engineCompRatio’
SOURCE=engineCompRatio.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/engine/lnInclude -IlnInclude -I. -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/engineCompRatio.o
/bin/sh: g++: command not found
make[3]: *** [Make/linux64GccDPOpt/engineCompRatio.o] Error 127
make[3]: Target /home/flakid/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/engineCompRatio' not remade because of errors. make[3]: Leaving directory /home/flakid/OpenFOAM/OpenFOAM-1.7.1/applications/utilities/postProcessing/miscellaneous/engineCompRatio’
make[2]: *** [engineCompRatio] Error 2
make[3]: Entering directory `/home/flakid/OpenFOAM/OpenFOAM-1.7.1/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects’
SOURCE=execFlowFunctionObjects.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/postProcessing/postCalc -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/transportModels -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels/LES/LESdeltas/lnInclude -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/basic/lnInclude -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/flakid/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/execFlowFunctionObjects.o
/bin/sh: g++: command not found
make[3]: *** [Make/linux64GccDPOpt/execFlowFunctionObjects.o] Error 127

Always error 2 and error 127,
g++:command not found.

What’s the problem?

Why all my packages are in keep state ,in a gray tick mark?

Have you ever installed gcc and gcc-c++ package???
I think you should install them and try again.

I command:

flakid@linux-38c6:~/OpenFOAM/OpenFOAM-1.7.1> rpm -qa gcc*
gcc-4.5-4.2.x86_64
gcc-c+±4.5-4.2.x86_64

flakid wrote:

>
> Always error 2 and error 127,
> g++:command not found.
>
> What’s the problem?
>
>
Check if you have c++ really installed by


rpm -q gcc-c++

if this tells you that you don’t have it install it with


sudo zypper in gcc-c++

this package contains the g++ command.


openSUSE 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.5 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | KDE 4.5 | Quadro FX
3600M | 4GB Ram

flakid wrote:

>
> I command:
>
> flakid@linux-38c6:~/OpenFOAM/OpenFOAM-1.7.1> rpm -qa gcc*
> gcc-4.5-4.2.x86_64
>
>
> gcc-c+±4.5-4.2.x86_64
>
>
Ok so it is not a problem of a missing c++ compiler. Since we do not know
what you did exactly before:
Did you execute the foamSystemCheck script to check if the system
requirements are met and what did it tell you?


openSUSE 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.5 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | KDE 4.5 | Quadro FX
3600M | 4GB Ram

flakid@linux-38c6:~/OpenFOAM/OpenFOAM-1.7.1> foamSystemCheck

Checking basic system…

Shell: /bin/bash
Host: linux-38c6
OS: Linux version 2.6.34-12-desktop
User: flakid

System check: PASS

Continue OpenFOAM installation.

flakid wrote:

>
> flakid@linux-38c6:~/OpenFOAM/OpenFOAM-1.7.1> foamSystemCheck
>
> Checking basic system…
> -----------------------------------------------------------------------
> Shell: /bin/bash
> Host: linux-38c6
> OS: Linux version 2.6.34-12-desktop
> User: flakid
>
>
> System check: PASS
> ==================
> Continue OpenFOAM installation.
>
>
I just build now openfoam 1.7.1 on my machine which takes a while, to see if
I get the same error. Until now it runs completely smooth (it compiles right
now), I followed exactly the instructions here
http://www.openfoam.com/download/source.php
and use as path $HOME/OpenFOAM for the sources and compilation.


openSUSE 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.5 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | KDE 4.5 | Quadro FX
3600M | 4GB Ram

So far everything went well on my system, I guess something is wrong with
your installation of the development pattern.
Your rpm output looks really strange
flakid@linux-38c6:~/OpenFOAM/OpenFOAM-1.7.1> rpm -qa gcc*
> gcc-4.5-4.2.x86_64
> gcc-c+±4.5-4.2.x86_64

I recommend you open a terminal and enter precisely this command to
reinstall it


sudo zypper install -t pattern devel_C_C++


openSUSE 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.5 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | KDE 4.5 | Quadro FX
3600M | 4GB Ram