Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help installing gcc

Status
Not open for further replies.

rebayona

Technical User
Oct 22, 2001
32
0
0
CO
Hi, I just realized I didn't installed gcc when I first installed RedHat 7.1 on this server. I downloaded the latest gcc rpms, but as I'm a newbie here, I just ran the rpms, but nothing happened .... I installed gcc-2.96-81.src.rpm , gcc-2.96-85.i386.rpm , glibc-2.1.92-14.src.rpm and binutils-2.10.91.0.2-3.src.rpm. For what I see everything was OK, but I'm still unable to use gcc ... why? What am I missing here? Is it here, but do I hve to call it from its own path? Where is it?

Thank you guys,

Rafael
 
Hi,







Looks like you have mostly downloaded the source rpms (whatever.src.rpm) rather than the binaries (whatever.i386.rpm). That's a classic catch-22. You can't compile the compiler because you don't have a compiler & related utilities !







If you installed the binary gcc rpm you can see the files installed by the following command :







rpm -ql gcc (shows gcc is at /usr/bin/gcc)







That rpm has dependencies on 'binutils' and 'cpp' and 'glibc-devel' amongst others. So you'd need to install those too - in fact it wouldn't install without them unless you used the 'force' option.







As you've installed some source rpms you can test whether you have the compiler and tools properly installed by doing the following :







cd /usr/src/redhat/SPECS



rpm -bb --target=i686 binutils.spec







Assuming you changed nothing after you installed the binutils source rpm, that will invoke the compiler and build a binary RPM optimised for pentium class processors which will end up in the directory /usr/src/redhat/RPMS/i686 .







If you don't have all the bits then try installing all the .i386.rpms beginning with 'gcc' on your CD plus the 'binutils', 'cpp' and 'glibc-devel' ones.






Regards






















 
Thanks a lot, it worked!

I just used the RPMs from the CD, since the ones (newer) I downloaded didn't work. Now I can use gcc!

Rafael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top