How to install GCC on Redhat

clicknext

Banned
Mar 27, 2002
3,884
0
0
I need to install the gcc compiler on my computer so I can use the ./configure command. What's the easiest way to do this? I'm running Redhat7.3, and when I try to install it from the CD, it tells me that it depends on some other packages so I look around and finally find those, and then when I try to install it says the packages that gcc depends on depend on more packages. Is there a way to install it so that it takes care of the dependencies on its own? Or is there any other easier way to install it? I'm a noob at linux so I don't know much about how to do anything...
 

civad

Golden Member
May 30, 2001
1,397
0
0
Have you tried downloading the source files and building from source?

Make sure you read the installation and configuration documents.

GCC mirrors
 

Bremen

Senior member
Mar 22, 2001
658
0
0
How's he gonna compile gcc if he dosn't have a compiler yet? :cool: Easiest way out of this is to do a fresh install I'm afraid (just back up /home and /etc and you should be fine....mostly)
 

clicknext

Banned
Mar 27, 2002
3,884
0
0
Oh man.. I can't do that though, because I don't have enough time. All this is done during a roughly 1 hour period at school on a 300mhz celeron. I set up some other stuff already, like samba and some programs and such... it'd take a long time to get back to this stage... =/ wish I was using RH8 or 9, I'm pretty sure those have a much better way of installing things off the CD after initial installation... except those run like crap on the school computer.
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
redhat 8 and 9 dont behave any different. there is a port of apt-get for redhat out there somewhere that you could try. it will install all the depenedencies with gcc.

edit: try here
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
unfortunately if you only have a demo account for up2date, it can take days to get the package/update installed.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Just keeping walking back the dependency tree ... it's not that bad. Whenever it tells you your missing a dependency, just find that file and add it to your command line. Certainly not worth a reinstall.
 

clicknext

Banned
Mar 27, 2002
3,884
0
0
Originally posted by: ergeorge
Just keeping walking back the dependency tree ... it's not that bad. Whenever it tells you your missing a dependency, just find that file and add it to your command line. Certainly not worth a reinstall.

Problem with that is that whenever i get a message for a dependancy error and say I don't want to ignore it, it quits out of the program automatically, so I have to open it again, load all the packages, and start over. That was fine when there were just 3 packages I needed, but it just keeps getting more and more. On that 300mhz comp with an 8x CD-Rom, it takes forever just to load the program up.
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
yep, if its a long dependency list, it can take forever. Not to mention the dreadful circular dependency.
If you're at wits end, try the link for that apt-get port.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: clicknext
Originally posted by: ergeorge
Just keeping walking back the dependency tree ... it's not that bad. Whenever it tells you your missing a dependency, just find that file and add it to your command line. Certainly not worth a reinstall.

Problem with that is that whenever i get a message for a dependancy error and say I don't want to ignore it, it quits out of the program automatically, so I have to open it again, load all the packages, and start over. That was fine when there were just 3 packages I needed, but it just keeps getting more and more. On that 300mhz comp with an 8x CD-Rom, it takes forever just to load the program up.

Try using the command line rpm tool:

rpm -Ivh <list of rpm files>

When you have to add another rpm, just use the up arrow to get to your previous command, then paste the new filename in. You can also use wildcards, etc. in the filename list. So instead of

rpm -Ivh gcc-g77-3.2-7.i386.rpm gcc-c++-3.2-7.i386.rpm libgcc-3.2-7.i386.rpm gcc-3.2-7.i386.rpm

You could just do this:

rpm -Ivh *gcc*.rpm

GUI tools are nice sometimes, but the command line is often more flexible & powerful.