Code: Select all
su
password
yum install gcc-c++ compat-gcc-32 compat-gcc-32-c++
It will NOT find compat-gcc-32 or compat-gcc-32-c++, but it WILL find gcc-c++, which is exactly what you need for g++.
I found it here, while searching for an rpm for g++ (which isn't in the repos).
Code: Select all
.:[ root@dedanna.rocks.net : 11:31:20 : ~ ]:.:) yum install gcc-c++ compat-gcc-32 compat-gcc-32-c++
<snip for unnecessary mirror info>
mirror.spro.net already timed: 1.0922369957
* mirror.spro.net : 1.092237 secs
* updates: mirrors.greenmountainaccess.net
C6.2-base | 3.7 kB 00:00
C6.2-centosplus | 3.5 kB 00:00
C6.2-contrib | 951 B 00:00
C6.2-extras | 3.5 kB 00:00
C6.2-updates | 3.5 kB 00:00
adobe-linux-i386 | 951 B 00:00
base | 3.7 kB 00:00 ...
centosplus | 3.5 kB 00:00
contrib | 951 B 00:00
extras | 3.5 kB 00:00 ...
linuxtech-release | 1.3 kB 00:00
updates | 3.5 kB 00:00
<snip unnecessary info>
Dependencies Resolved
=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
gcc-c++ i686 4.4.6-4.el6 base 4.3 M
Installing for dependencies:
libstdc++-devel i686 4.4.6-4.el6 base 1.5 M
And there you go. The repos were showed so you would know which ones are needed. Now you will have g++ to install your compiled proggies with.