Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-03-2009, 01:34 PM   #1
LQ Newbie
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
Help installing GCC

I am used to working on Ubuntu and am trying to get something going on a machine that is running Redhat Enterprise Linux Server release 5.4.

I want to do something that seems like it should be pretty simple - I just want to install gcc.

I started going to rpm route. Please forgive me - I am totally new to rpms. First I tried downloading an rpm file. I searched on this site:

And I wasn't sure which one to pick.

When I tried installing it I got a message that there are a bunch of dependencies I don't have. I feel like I am making this way harder than it needs to be. Is there an easy way to install gcc?

Old 11-03-2009, 01:41 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,943
Blog Entries: 14

Rep: Reputation: 1160Reputation: 1160Reputation: 1160Reputation: 1160Reputation: 1160Reputation: 1160Reputation: 1160Reputation: 1160Reputation: 1160
RHEL5 (and Fedora and CentOS 5) use rpm and yum. RPM = RedHat Package Manager. YUM = Yellowdog Update Manager.

Yum will install rpm packages AND resolve dependencies.

You should have registered your system on RedHat Network (RHN) at the end of the install. If you did then simply running "yum install gcc" would download and install gcc and the dependencies.

Prior to running that you should run "rpm -q gcc" to verify it isn't already installed. Your issue may be that you have gcc but its not in your PATH. Type "rpm -ql gcc" will show you where all the files the rpm installed are.
Old 11-03-2009, 01:44 PM   #3
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,697

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
Welcome to LQ.

Getting the c compiler on Redhat EL 5 :
Please do these commands in the terminal :
1) su <enter-password>
2) yum install gcc

For the c++ compiler ( g++ ) :
3) yum install gcc-c++
Old 11-03-2009, 03:58 PM   #4
LQ Newbie
Registered: Nov 2009
Posts: 2

Original Poster
Rep: Reputation: 0
By gosh golly it worked! Thank you for enlightening me - life was sucking without YUM! I was starting to think that anyone who used RedHat was crazy. Much better now!



el5, redhat

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
Installing vmware on Open Suse 11.1 - Requires original gcc 4.32 - gcc now 4.3 cyclops.matrix Linux - Software 2 08-31-2009 02:52 PM
Installing gcc - need help Jinouchi Linux - Software 7 04-09-2008 12:24 AM
installing gcc sndt Linux - Newbie 2 03-29-2006 07:06 AM
Installing GCC holyfeces Linux - Newbie 5 01-10-2005 02:35 PM
Installing GCC 3.1 over GCC 2.96...? aaronluke Linux - General 3 09-27-2002 05:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 PM.

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