Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a RHEL 6 machine, which came with gcc but without g++. The gcc version is 4.4.4 20100726 (this is what I got from gcc --version).

How can I get g++ working? Currently, the shell just returns "command not found".

share|improve this question
It's called gcc-c++ in RedHat. – iamsid Nov 23 '10 at 14:32

You need to install the gcc-c++ package: yum install gcc-c++

share|improve this answer
Thank you - but I'm getting "No package gcc-c++ available". What can be the reason? – rursw1 Nov 23 '10 at 14:45
Post the results of rpm -qa | grep gcc – iamsid Nov 23 '10 at 15:03
@iamsid rpm -qa | grep gc for me gives only these packages: libgcc-4.4.5-6.el6.x86_64, gcc-4.4.5-6.el6.x86_64 – Artem Oboturov Aug 20 '11 at 14:09
@ArtemAO If your server is not registered on rhn yum will not work.. You'd have to install the version on your cd. – Mike Aug 20 '11 at 16:43
Thank you. It works! – Jerry Apr 25 at 9:24

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.