LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 11-16-2010, 05:36 PM   #1
someshpr
Member
 
Registered: Jul 2009
Location: CA, USA
Distribution: Debian, RHEL5.4, CentOS 5.4, 6.2, Ubuntu 11.04,12.04
Posts: 107

Rep: Reputation: 26
installing g++ in RHEL 5.4


I needed to install in g++. So I tried with yum and failed.
Code:
[root@mesozoic ~]# yum install gcc g++ gcc-c++
Loaded plugins: rhnplugin, security
Setting up Install Process
Package gcc-4.1.2-46.el5_4.2.x86_64 already installed and latest version
No package g++ available.
No package gcc-c++ available.
Nothing to do
I am pretty sure I had the subscriptions. Here is the result of repolist:
Code:
[root@mesozoic ~]# yum repolist
Loaded plugins: rhnplugin, security
repo id                          repo name                                                              status
rhel-x86_64-client-5             Red Hat Enterprise Linux Desktop (v. 5 for 64-bit x86_64)              enabled: 6,299
repolist: 6,299
I tried search and found no g++ in repositories, whereas search for c++ in repositories only gives some packages:
Code:
[root@mesozoic ~]# yum search g++
Loaded plugins: rhnplugin, security
Warning: No matches found for: g++
No Matches found
[root@mesozoic ~]# yum search c++
Loaded plugins: rhnplugin, security
================================================ Matched: c++ =================================================
qt.i386 : The shared library for the Qt GUI toolkit.
qt.x86_64 : The shared library for the Qt GUI toolkit.
qt-config.x86_64 : Grapical configuration tool for programs using Qt
tog-pegasus-devel.i386 : The OpenPegasus Software Development Kit
tog-pegasus-devel.x86_64 : The OpenPegasus Software Development Kit
ImageMagick-c++.i386 : ImageMagick Magick++ library (C++ bindings)
ImageMagick-c++.x86_64 : ImageMagick Magick++ library (C++ bindings)
agg.i386 : Anti-Grain Geometry
agg.x86_64 : Anti-Grain Geometry
antlr.x86_64 : ANother Tool for Language Recognition
boost.i386 : The Boost C++ Libraries
boost.x86_64 : The Boost C++ Libraries
boost-doc.x86_64 : The Boost C++ html docs
compat-gcc-34-c++.x86_64 : C++ support for compatibility compiler
compat-libstdc++-296.i386 : Compatibility 2.96-RH standard C++ libraries
compat-libstdc++-33.i386 : Compatibility standard C++ libraries
compat-libstdc++-33.x86_64 : Compatibility standard C++ libraries
db4.i386 : The Berkeley DB database library (version 4) for C.
db4.x86_64 : The Berkeley DB database library (version 4) for C.
db4-utils.x86_64 : Command line tools for managing Berkeley DB (version 4) databases.
festival.i386 : A free speech synthesizer
festival.x86_64 : A free speech synthesizer
frysk.x86_64 : Frysk execution analysis tool
frysk-gnome.x86_64 : The GUI frontend of Frysk.
gcc.x86_64 : Various compilers (C, C++, Objective-C, Java, ...)
gdb.x86_64 : A GNU source-level debugger for C, C++, Java and other languages.
gperf.x86_64 : A perfect hash function generator.
kdebindings.x86_64 : KDE bindings to non-C++ languages
libstdc++.i386 : GNU Standard C++ Library
libstdc++.x86_64 : GNU Standard C++ Library
libwvstreams.i386 : WvStreams is a network programming library written in C++.
libwvstreams.x86_64 : WvStreams is a network programming library written in C++.
python.x86_64 : An interpreted, interactive, object-oriented programming language.
qt4.i386 : The shared library for the Qt GUI toolkit
qt4.x86_64 : The shared library for the Qt GUI toolkit
sip.x86_64 : SIP - Python/C++ Bindings Generator
swig.x86_64 : Connects C/C++/Objective C to some high-level programming languages.
How to install g++ then?

TIA,
 
Old 11-16-2010, 06:25 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I don't have one to test but maybe you're missing the 'workstation' sub-channel of RHEL Desktop ...

hth
 
1 members found this post helpful.
Old 11-16-2010, 07:19 PM   #3
someshpr
Member
 
Registered: Jul 2009
Location: CA, USA
Distribution: Debian, RHEL5.4, CentOS 5.4, 6.2, Ubuntu 11.04,12.04
Posts: 107

Original Poster
Rep: Reputation: 26
Thanks a lot, kbp!
Yes, changing the subscription channel worked.
But now when I tried yum, it gave me dependency errors:
Code:
[root@mesozoic ~]# yum install gcc-c++
Loaded plugins: rhnplugin, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: gcc-c++ = 4.1.2-46.el5_4.2 for package: gcc-objc++
---> Package gcc-c++.x86_64 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libstdc++-devel = 4.1.2-48.el5 for package: gcc-c++
--> Processing Dependency: libstdc++ = 4.1.2-48.el5 for package: gcc-c++
--> Processing Dependency: gcc = 4.1.2-48.el5 for package: gcc-c++
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libstdc++ = 4.1.2-48.el5 for package: gcc-c++
--> Processing Dependency: gcc = 4.1.2-48.el5 for package: gcc-c++
---> Package gcc-objc++.x86_64 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: gcc-objc = 4.1.2-48.el5 for package: gcc-objc++
---> Package libstdc++-devel.x86_64 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libstdc++ = 4.1.2-48.el5 for package: libstdc++-devel
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libstdc++ = 4.1.2-48.el5 for package: gcc-c++
--> Processing Dependency: gcc = 4.1.2-48.el5 for package: gcc-c++
---> Package gcc-objc.x86_64 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libobjc = 4.1.2-48.el5 for package: gcc-objc
--> Processing Dependency: gcc = 4.1.2-48.el5 for package: gcc-objc
---> Package libstdc++-devel.x86_64 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libstdc++ = 4.1.2-48.el5 for package: libstdc++-devel
--> Finished Dependency Resolution
libstdc++-devel-4.1.2-48.el5.x86_64 from rhel-x86_64-client-workstation-5 has depsolving problems
  --> Missing Dependency: libstdc++ = 4.1.2-48.el5 is needed by package libstdc++-devel-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
gcc-c++-4.1.2-48.el5.x86_64 from rhel-x86_64-client-workstation-5 has depsolving problems
  --> Missing Dependency: libstdc++ = 4.1.2-48.el5 is needed by package gcc-c++-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
gcc-c++-4.1.2-48.el5.x86_64 from rhel-x86_64-client-workstation-5 has depsolving problems
  --> Missing Dependency: gcc = 4.1.2-48.el5 is needed by package gcc-c++-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
gcc-objc-4.1.2-48.el5.x86_64 from rhel-x86_64-client-workstation-5 has depsolving problems
  --> Missing Dependency: gcc = 4.1.2-48.el5 is needed by package gcc-objc-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
gcc-objc-4.1.2-48.el5.x86_64 from rhel-x86_64-client-workstation-5 has depsolving problems
  --> Missing Dependency: libobjc = 4.1.2-48.el5 is needed by package gcc-objc-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
Error: Missing Dependency: libstdc++ = 4.1.2-48.el5 is needed by package gcc-c++-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
Error: Missing Dependency: libobjc = 4.1.2-48.el5 is needed by package gcc-objc-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
Error: Missing Dependency: gcc = 4.1.2-48.el5 is needed by package gcc-objc-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
Error: Missing Dependency: libstdc++ = 4.1.2-48.el5 is needed by package libstdc++-devel-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
Error: Missing Dependency: gcc = 4.1.2-48.el5 is needed by package gcc-c++-4.1.2-48.el5.x86_64 (rhel-x86_64-client-workstation-5)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
I tried all the suggestions given at the end, but no avail! I also tried reinstalling gcc, libstdc++, gcc-objc.

How do I sort this version issue?
Any idea, please?

TIA
 
Old 11-16-2010, 07:36 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I'm not sure .. maybe try removing gcc-objc then installing gcc-g++ ..

Just a thought, how did you change the subscription channel ? ...

Last edited by kbp; 11-16-2010 at 07:38 PM.
 
Old 11-16-2010, 07:45 PM   #5
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Sorry, just noticed the version difference that you mentioned, can you uninstall gcc and friends then just install gcc-c++, this should pull in the correct version of the dependencies
 
Old 11-16-2010, 08:16 PM   #6
John VV
Guru
 
Registered: Aug 2005
Posts: 12,597

Rep: Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677
there is the "groupinstall" - " Development Tools" that should have been used to install gcc and all the tools needed
then the "groupinstall" - " Development Librarys" for the devel rpms

for a list run
Code:
su -
yum grouplist 

-- then install them --- 
yum groupinstall  "Development Tools" "Development Librarys"
you MIGHT want to read the "man" page for yum and the yum help page
Code:
yum --help 
-- and --
man yum
 
Old 11-16-2010, 09:21 PM   #7
someshpr
Member
 
Registered: Jul 2009
Location: CA, USA
Distribution: Debian, RHEL5.4, CentOS 5.4, 6.2, Ubuntu 11.04,12.04
Posts: 107

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by kbp View Post
I'm not sure .. maybe try removing gcc-objc then installing gcc-g++ ..

Just a thought, how did you change the subscription channel ? ...
Quote:
Originally Posted by kbp View Post
Sorry, just noticed the version difference that you mentioned, can you uninstall gcc and friends then just install gcc-c++, this should pull in the correct version of the dependencies
Thanks kbp! I tried removing gcc-objc, gcc, and reinstalled gcc, libstdc++. Same error.

On changing subscription channel: I logged in to my rhn.redhat.com account and chose my system. In the system page, there was a link for alter channel subscriptions which gives available channels.


Quote:
Originally Posted by John VV View Post
there is the "groupinstall" - " Development Tools" that should have been used to install gcc and all the tools needed
then the "groupinstall" - " Development Librarys" for the devel rpms

for a list run
Code:
su -
yum grouplist 

-- then install them --- 
yum groupinstall  "Development Tools" "Development Librarys"
you MIGHT want to read the "man" page for yum and the yum help page
Code:
yum --help 
-- and --
man yum
Thanks John! I did try groupinstall earlier, with both "Development Tools" and "Development Libraries". It returns lots of missing dependencies. When run with --skip-broken, it tries to install few packages, skipping a lot more! gcc-c++, gcc-gfortran all are in the to be skipped list. Attached is the list.
Attached Files
File Type: txt typescript.txt (110.7 KB, 4 views)
 
Old 11-16-2010, 10:28 PM   #8
someshpr
Member
 
Registered: Jul 2009
Location: CA, USA
Distribution: Debian, RHEL5.4, CentOS 5.4, 6.2, Ubuntu 11.04,12.04
Posts: 107

Original Poster
Rep: Reputation: 26
From the error message I posted on third post of this thread, as far as I understand, instead of 4.1.2-46 version it is going to update 4.1.2-48 version of gcc-c++.
What is confusing me is that the dependency error starts with
Code:
Package gcc-c++.x86_64 0:4.1.2-48.el5 set to be updated
And this 4.1.2-48 version is causing problem.
 
Old 11-16-2010, 10:51 PM   #9
John VV
Guru
 
Registered: Aug 2005
Posts: 12,597

Rep: Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677
well seeing as you are using RHEL 5.4
Then you ARE paying for tech support and access to the RHN
call red hat -- that is one of the reasons you ARE paying for the license , right .

Quote:
It returns lots of missing dependencies.
??? odd that should NOT happen with RHN ,those groups ARE IN THERE

please post the output of
Code:
yum repolist all

Last edited by John VV; 11-17-2010 at 12:49 AM.
 
1 members found this post helpful.
Old 11-17-2010, 09:03 AM   #10
someshpr
Member
 
Registered: Jul 2009
Location: CA, USA
Distribution: Debian, RHEL5.4, CentOS 5.4, 6.2, Ubuntu 11.04,12.04
Posts: 107

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by John VV View Post
well seeing as you are using RHEL 5.4
Then you ARE paying for tech support and access to the RHN
call red hat -- that is one of the reasons you ARE paying for the license , right .


??? odd that should NOT happen with RHN ,those groups ARE IN THERE

please post the output of
Code:
yum repolist all
My free (one year) subscription came with the machine. So I should utilize that before it expires, and call them!

On the issue: I finally got g++ installed by using gcc-c++4.1.2-46 rpm from rpm.pbone.net. And it is working.

But still the same dependency issue is still there, and if I want to do <yum update> it exists giving same error (missing dependency for gcc-c++4.1.2-48). Here is the output of <yum repolist all>
Code:
[root@mesozoic ~]# yum repolist all
Loaded plugins: rhnplugin, security
repo id                                                repo name                                                                        status
rhel-debuginfo                                         Red Hat Enterprise Linux 5Client - x86_64 - Debug                                disabled
rhel-x86_64-client-5                                   Red Hat Enterprise Linux Desktop (v. 5 for 64-bit x86_64)                        enabled: 6,299
rhel-x86_64-client-workstation-5                       RHEL Desktop Workstation (v. 5 for 64-bit x86_64)                                enabled: 4,243
repolist: 10,542
I'll update on what Redhat has to say about it after I get an answer from them.
 
1 members found this post helpful.
Old 10-25-2011, 06:18 AM   #11
goodGOD
LQ Newbie
 
Registered: Dec 2010
Posts: 14

Rep: Reputation: 0
@John VV

thanks so much for this. Do have a great day!!



Please where is the best resource for learning c++ on fedora 15. thanks
 
  


Reply

Tags
g++, gcc, rhel54, yum


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to boot to RHEL 4 32 bit after installing RHEL 64 - bit raj_ksrt Linux - Software 1 04-27-2009 09:44 AM
Need Help installing RHEL 5 pratiktolia Linux - Newbie 3 03-14-2009 11:46 AM
help installing rhel 4 daziplqa Red Hat 1 09-22-2006 01:47 PM
Installing cP on RHEL Hexadecimal Linux - Software 2 08-20-2005 06:40 PM
Installing RHEL WS 4 nifflerX Linux - Enterprise 3 03-26-2005 01:33 PM


All times are GMT -5. The time now is 06:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration