Install g++ when having gcc (C only) -- RH6

14,305

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

Share:
14,305

Related videos on Youtube

rursw1
Author by

rursw1

-

Updated on September 17, 2022

Comments

  • rursw1
    rursw1 over 1 year

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

    • iamsid
      iamsid over 13 years
      It's called gcc-c++ in RedHat.
  • rursw1
    rursw1 over 13 years
    Thank you - but I'm getting "No package gcc-c++ available". What can be the reason?
  • iamsid
    iamsid over 13 years
    Post the results of rpm -qa | grep gcc
  • frayab
    frayab over 12 years
    @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
  • Mike
    Mike over 12 years
    @ArtemAO If your server is not registered on rhn yum will not work.. You'd have to install the version on your cd.