Home > Linux Tricks > How to Install g++ on CentOS 4 and CentOS 5

How to Install g++ on CentOS 4 and CentOS 5

November 19th, 2008 Leave a comment Go to comments

g++ is often necessary for building various packages. But It’s quite hard to install it in CentOS if you don’t know a simple thing: yum install g++ will not work here. yum install compat-g++and yum install gcc-g++ won’t give any result too.  The only command for yum to install g++ on CentOS is the following:

yum install gcc-c++

You might also want to install it with some more useful packages. Then your command will be:

yum install gcc-c++ compat-gcc-32 compat-gcc-32-c++

Hope this helps you to install g++ under CentOS

  1. May 8th, 2009 at 05:49 | #1

    This was just what I was looking for when I couldn’t locate the package via yum search.

    Thanks!

  2. Raul Maricotas
    September 9th, 2009 at 20:28 | #2

    Gracias manito, me sacaste de un lio

  1. No trackbacks yet.