Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a RedHat 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
1  
It's called gcc-c++ in RedHat. –  iamsid Nov 23 '10 at 14:32
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.