System Administration
Showing results for 
Search instead for 
Did you mean: 

g++: installation problem on RHEL 5.3

Regular Advisor

g++: installation problem on RHEL 5.3

We are facing a problem in our RHEL 5.3 server after upgrading it from RHEL4.6 to RHEL 5.3. We are trying to compile C++ file on the same machine and getting the below error message. When we try to compile any .cpp file using g++ we get the following error:

[root@test1]# /usr/bin/g++ test.cpp

g++: installation problem, cannot exec `cc1plus': No such file or directory


We have checked the gcc and g++ installation and below are the path where there packages are installed on the server. We also tried to find “cc1plus” file but it is not there on the server.

[root@test1]# whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz

[root@test1]# whereis g++
g++: /usr/bin/g++ /usr/share/man/man1/g++.1.gz

Please help

Thanks in advance.
Steven E. Protter
Exalted Contributor

Re: g++: installation problem on RHEL 5.3


Though its an option I ran into a lot of similar problems when I upgraded my home based lab from rhel 4.7 to rhel 5.2

In the end, I had to do a cold install to get everything working.

Steven E Protter
Owner of ISN Corporation
Steven McCoy
Valued Contributor

Re: g++: installation problem on RHEL 5.3

I agree with Steven E. Potter, however, have you tried reinstalling all the gcc/g++ packages?

Whether reinstalling the packages works or not, I feel you'll be chasing issues like that for a long time after doing an upgrade from 4.x to 5.x.

As SEP suggested, a reinstall is your best bet.