11

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".

  • 1
    It's called gcc-c++ in RedHat. – iamsid Nov 23 '10 at 14:32
17

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

  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.