LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2010, 06:20 PM   #1
jpt624
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Rep: Reputation: 0
gcc ++


hi
I just loaded rhel5.I have a tool that needs g++
and its not loaded
I know enough to be dangerous...I know what Yum is.
I do--
yum install gcc-c++
and get
No package gcc-c++ available.
Nothing to do
this is where I'm lost..
I suspect I'm not pointing to the correct repo
I dont have a separate file for repos
thanks for the wisdom............


my yum.config is:
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800


[rhel5]
name = rhel5

baseurl=http://dag.linux.iastate.edu/dag/redhat/el5/en/i386/dag
#baseurl=http://www.mirrorservice.org/sites/jpackage.org/1.7/generic/free
http://jpackage.netmindz.net/1.7/generic/free
http://sunsite.rediris.es/mirror/jpa...7/generic/free
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch

enabled=1
 
Old 07-24-2010, 02:24 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,185

Rep: Reputation: 52
g++ is just a part of gcc. install all of gcc
 
Old 07-24-2010, 07:22 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
1) su , 2) yum install gcc-c++

And if "No package gcc-c++ available" appears,
please check, that your Redhat account is activated.
( No Redhat account : yum will not work.)

The repo URLs you show, will only provide some extra packages.
Also : epel etc. will only work with the presence of the original "[redhat.repo]".
.......

Last edited by knudfl; 07-24-2010 at 07:30 AM.
 
Old 07-24-2010, 07:27 AM   #4
jpt624
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by whansard View Post
g++ is just a part of gcc. install all of gcc
thanks
 
Old 07-24-2010, 07:35 AM   #5
jpt624
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by whansard View Post
g++ is just a part of gcc. install all of gcc
will try
thanks
 
Old 07-24-2010, 08:14 AM   #6
jpt624
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Original Poster
Rep: Reputation: 0
g++ seems nt to be part of gcc

Quote:
Originally Posted by whansard View Post
g++ is just a part of gcc. install all of gcc
[root@localhost Downloads]# yum install gcc
Loaded plugins: rhnplugin, security
Setting up Install Process
Package gcc-4.1.2-48.el5.x86_64 already installed and latest version
Nothing to do

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

[root@localhost Downloads]# which gcc
/usr/bin/gcc

[root@localhost Downloads]# which g++
/usr/bin/which: no g++ in
 
Old 07-24-2010, 08:29 AM   #7
jpt624
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
1) su , 2) yum install gcc-c++

And if "No package gcc-c++ available" appears,
please check, that your Redhat account is activated.
( No Redhat account : yum will not work.)

The repo URLs you show, will only provide some extra packages.
Also : epel etc. will only work with the presence of the original "[redhat.repo]".
.......
yum upgrade seems to work--- so yum appears to be working but I still
get:

[root@localhost Downloads]# yum install gcc-c++
Loaded plugins: rhnplugin, security
Setting up Install Process
No package gcc-c++ available.
Nothing to do
 
Old 07-24-2010, 08:40 AM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Quote:
Originally Posted by jpt624 View Post
thanks
Quote:
Originally Posted by jpt624 View Post
will try
thanks
Please don't double post. Just edit the original one if you want to modify it.
 
Old 07-24-2010, 08:41 AM   #9
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Maybe you can try:

Code:
yum search gcc c++
?

I don't know if it will help, I'm not very familiar wit yum.
 
Old 07-24-2010, 11:03 AM   #10
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
GCC C++ uses the command g++ so if you want to see if you already have it installed, use the command
Code:
which g++
If you want to see what package it is in, I'm not certain about RHEL, but in Centos it would be: switch to root and do
Code:
yum provides "*/g++"
 
Old 07-24-2010, 11:09 AM   #11
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 728

Rep: Reputation: 74
Hi.

Using:
Code:
yum info '*gcc*'
yields (among many other items):
Code:
Name       : gcc-c++
Arch       : i386
Version    : 4.1.2
Release    : 48.el5
Size       : 6.5 M
Repo       : installed
Summary    : C++ support for GCC
URL        : http://gcc.gnu.org
License    : GPL
Description: This package adds C++ support to the GNU Compiler Collection.
           : It includes support for most of the current C++ specification,
           : including templates and exception handling.
Looking at the repositories for this installation:
Code:
$ yum repolist
Loaded plugins: priorities
repo id                     repo name                              status
addons                      CentOS-5 - Addons                      enabled:    0
base                        CentOS-5 - Base                        enabled: 2599
extras                      CentOS-5 - Extras                      enabled:  333
updates                     CentOS-5 - Updates                     enabled:  352
repolist: 3284
This machine runs CentOS:
Code:
OS, ker|rel, machine: Linux, 2.6.18-194.3.1.el5, i686
Distribution        : CentOS release 5.5 (Final)
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Running the suggestion from johnsfine (root not needed):
Code:
$ yum provides "*/g++"
Loaded plugins: priorities
base/filelists_db                                        | 3.4 MB     00:12     
extras/filelists_db                                      | 196 kB     00:00     
updates/filelists_db                                     | 1.3 MB     00:04     
gcc-c++-4.1.2-48.el5.i386 : C++ support for GCC
Repo        : base
Matched from:
Filename    : /usr/bin/g++

gcc-c++-4.1.2-48.el5.i386 : C++ support for GCC
Repo        : installed
Matched from:
Filename    : /usr/bin/g++
Best wishes ... cheers, makyo

Last edited by makyo; 07-24-2010 at 11:10 AM.
 
  


Reply


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
gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7) compilation error adhesh_19 Red Hat 0 01-05-2010 06:34 AM
Installing vmware on Open Suse 11.1 - Requires original gcc 4.32 - gcc now 4.3 cyclops.matrix Linux - Software 2 08-31-2009 03:52 PM
Compile error, 'H5G_obj_t' does not name a type, is gcc 4.3 incompatible with gcc 3 ? samrat_rao Linux - Software 5 03-03-2009 03:28 PM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 03:13 PM


All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration