[rhn-users] installing g++ on my RH desktop

Peter C. Lai peter at simons-rock.edu
Wed Feb 4 17:27:23 UTC 2009


On rhel5 here is what I have for a working c++ compiler:

[root at trac1 httpd]# rpm -qa | grep gcc
gcc-c++-4.1.2-42.el5
libgcc-4.1.2-42.el5
gcc-4.1.2-42.el5

(still on 5.2 not upgraded to 5.3...)

[root at trac1 httpd]# yum search gcc-c++
gcc-c++.i386 : C++ support for GCC
gcc-c++.i386 : C++ support for GCC


On 2009-02-04 11:03:30AM -0600, Christopher L. Barnard wrote:
> 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 at 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 at 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 at 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 at 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 at 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 at 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 at cbar-linux ~]# cd /
> [root at cbar-linux /]# find / -name g++ -print
> [root at 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.
> 
> _______________________________________________
> rhn-users mailing list
> rhn-users at redhat.com
> https://www.redhat.com/mailman/listinfo/rhn-users

-- 
===========================================================
Peter C. Lai                 | Bard College at Simon's Rock
Systems Administrator        | 84 Alford Rd.
Information Technology Svcs. | Gt. Barrington, MA 01230 USA
peter AT simons-rock.edu     | (413) 528-7428
===========================================================




More information about the rhn-users mailing list