installing g++ on my RH desktop

"Christopher L. Barnard" <[email protected]>
Newsgroups gmane.linux.redhat.rhn.user
Organization Rush University Medical Center
Message-ID <[email protected]>
Well, the archives were very helpful (and I have bookmarked them) but I
did not see an answer to my question.

This sad story starts with the error message when configuring
something to compile:

C++ preprocessor "/lib/cpp" fails sanity check

Checking the configure logs, g++ is not found.  Checking google and the
rhn-users archives, I see that some compilers are not included in the
full gcc suite, and they have to be added separately.  Not a problem,
I'll add g++.  I do a quick check to see what version of gcc I have
installed:

gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)

OK.  I need gcc-c++ for gcc 4.1.2-44.

[root@cbar-linux ~]# yum update gcc-c++-4.1.2-44.el5.i386
Loaded plugins: rhnplugin, security
rhel-i386-client-5                               | 1.3 kB     00:00     
primary.xml.gz                                   | 1.6 MB     00:02     
rhel-i386-client-5                                    4294/4294
adobe-linux-i38                                  |  951 B     00:00     
Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update

OK, maybe I am being too specific.

[root@cbar-linux ~]# yum update gcc-c++
Loaded plugins: rhnplugin, security
Setting up Install Process
Parsing package install arguments
No package gcc-c++ available.
Nothing to do

Nope.  Wait a sec, do I want to 'update' or 'install'

[root@cbar-linux ~]# yum install gcc-c++
Loaded plugins: rhnplugin, security
Setting up Install Process
Parsing package install arguments
No package gcc-c++ available.
Nothing to do

Nope, that wasn't it either. Then I see in the archives that someone
used a 'search' directive in yum.  g++ did not work, gcc* did not work,
but it looks like 'yum search gcc' hit paydirt.

[root@cbar-linux ~]# yum search gcc
Loaded plugins: rhnplugin, security
============================= Matched: gcc =============================
compat-glibc.i386 : Compatibility C library
compat-gcc-34.i386 : Compatibility GNU Compiler Collection
compat-gcc-34-c++.i386 : C++ support for compatibility compiler
compat-gcc-34-g77.i386 : Fortran 77 support for compatibility compiler
compat-libgcc-296.i386 : Compatibility 2.96-RH libgcc library
compat-libstdc++-296.i386 : Compatibility 2.96-RH standard C++ libraries
compat-libstdc++-33.i386 : Compatibility standard C++ libraries
cpp.i386 : The C Preprocessor.
gcc.i386 : Various compilers (C, C++, Objective-C, Java, ...)
libgcc.i386 : GCC version 4.1 shared support library
libgcj.i386 : Java runtime library for gcc
libgnat.i386 : GNU Ada 95 runtime shared libraries
libgomp.i386 : GCC OpenMP 2.5 shared support library
libmudflap.i386 : GCC mudflap shared support library
libstdc++.i386 : GNU Standard C++ Library
libtermcap.i386 : A basic system library for accessing the termcap
database.

Bingo! It looks like I want compat-gcc-34-c++.i386...

[root@cbar-linux ~]# yum install compat-gcc-34-c++.i386
Loaded plugins: rhnplugin, security
Setting up Install Process
Parsing package install arguments
Package compat-gcc-34-c++-3.4.6-4.i386 already installed and latest
version
Nothing to do

hmmm.  The system thinks g++ is already installed. But it is not. 

[root@cbar-linux ~]# which g++
/usr/bin/which: no g++ in
(/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

[root@cbar-linux ~]# cd /
[root@cbar-linux /]# find / -name g++ -print
[root@cbar-linux ~]#

So what am I missing?


-- 
Christopher Barnard
--------------------------------------------------------------------------
comment your code as if the maintainer will be a homicidal maniac who
knows where you live.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.