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 04-29-2009, 05:30 AM   #1
piduruviswa
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Rep: Reputation: 0
gcc installation errors


Hi All,

I have been trying to install gcc on my RHEL 5.1 but facing issues with installation.

I tried downloading lot of rpm packages from different sites but not able to install gcc..

# rpm -ivh gcc4-4.0.0-0.14.EL4.src.rpm
warning: gcc4-4.0.0-0.14.EL4.src.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
error: cannot create %sourcedir /usr/src/redhat/SOURCES

I can't build it from the source as I dont have the compiler to build.

I'm newbie in Linux, pls help me with the right steps to install gcc.

Rgds
 
Old 04-29-2009, 05:57 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

Does 'yum install gcc' not work?

Dave
 
Old 04-29-2009, 06:02 AM   #3
piduruviswa
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Hi,

I tried even that I'm getting below error.

# yum install gcc*
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
Parsing package install arguments
Examining gcc4-4.0.0-0.14.EL4.src.rpm: gcc4 - 4.0.0-0.14.EL4.x86_64
Marking gcc4-4.0.0-0.14.EL4.src.rpm to be installed
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package gcc4.x86_64 0:4.0.0-0.14.EL4 set to be updated
--> Running transaction check
--> Processing Dependency: zlib-devel for package: gcc4
--> Processing Dependency: dejagnu for package: gcc4
--> Processing Dependency: flex for package: gcc4
--> Processing Dependency: texinfo for package: gcc4
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc4
--> Processing Dependency: bison for package: gcc4
--> Finished Dependency Resolution
Error: Missing Dependency: zlib-devel is needed by package gcc4
Error: Missing Dependency: dejagnu is needed by package gcc4
Error: Missing Dependency: flex is needed by package gcc4
Error: Missing Dependency: texinfo is needed by package gcc4
Error: Missing Dependency: glibc-devel >= 2.2.90-12 is needed by package gcc4
Error: Missing Dependency: bison is needed by package gcc4
 
Old 04-29-2009, 06:51 AM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

Just run 'yum install gcc' - no '*' required. gcc is part of the standard packages, so just pull it down from the RedHat yum repo.

Either that or have a look on the install CDs.

Dave
 
Old 04-29-2009, 01:47 PM   #5
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
In order to use RH's repos you HAVE to pay for the subscription. RHEL is a PAY distro. If you do not wish to pay run Centos instead. Centos is RHEL with the logos removed. It is free to download/update and is binary compatible with RHEL(built from same source code).

Second, you are trying to install a RHEL4 package (the el4 part) on a RHEL5.X system. This will not work.

Third, you cannot install a src (source) rpm. You have to compile source rpms(you need a compiler to do this).
 
Old 05-01-2009, 10:51 AM   #6
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
Hi,
Please follow this method and you can surely get gcc working:

1.If you are having the RHEL5 DVD, then copy the Server directory from the DVD to your hard disk (say /Server)
2.then cd /Server.
3.rpm -ivh createrepo<press the tab key> and enter.
This will install createrepo package.
4.now, type:
createrepo -v /Server.
This will create the repositories, (almost 1200 RPMs are there).
5.now, type:
vi /etc/yum.repos.d/myrepo

A blank screen appears, now type:
[myrepo]
name=myrepo
baseurl=file:///Server
gpgcheck=0
enabled=1
6.Save this file.
7.now type, yum clean all
then,
yum install gcc
8.This will install gcc and its dependencies.
9.Make sure you have autoconf and automake packages, which are in the /Server directory.
10.

Last edited by saagar; 05-01-2009 at 10:52 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
LFS 6.3 .... 6.12.1. Installation of GCC make errors Axo Linux From Scratch 4 03-29-2008 03:18 AM
Initial gcc installation-How to compile gcc itself pgb205 Linux - Software 4 02-26-2008 11:24 PM
gcc errors gloomz Linux - Newbie 13 02-01-2007 11:02 AM
gcc errors? rlprofessional Linux - Newbie 1 06-13-2006 01:33 PM
gcc errors?? or are they? Rito Linux From Scratch 1 01-06-2003 05:54 PM


All times are GMT -5. The time now is 10:39 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