Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-17-2008, 12:15 PM
|
#1
|
LQ Newbie
Registered: Dec 2008
Posts: 2
Rep:
|
So I need a C compiler to install a c compiler. Makes sense.
Short version: How do i compile gcc without a previously existing c compiler? Can Anyone point me to an rpm for redhat 5? (rpmfind.net gives me nothing)
Hello,
I'm new to linux, with no background knowledge but with a willingness to spend 150 hours googling in order to get php running on my server. I've found a whole ladder of things that my server lacks, and right now, I've found I don't even have a valid c compiler installed.
I need a c compiler in order to install all the packages I deleted (I deleted apache and mysql in order to reinstall them, since they had issues) and the additional ones I need. But I apparently need a c compiler in order to install the c compiler I want (gcc). Can anyone point me to an RPM or explani how I'd go about this?
I've visited (among hundreds of other sites) this url http://www.cyberciti.biz/faq/howto-i...piler-on-rhel/
but my package manager doesn't seem to recognize the untarred automake, autoconf and gcc folders in my root as packages.
Thank you very much to anyone who read this much. I'm running redhat 5, i think. Here's what cat /etc/*-release returns for me:
Code:
Red Hat Enterprise Linux Client release 5 (Tikanga)
And here's what "version" returns when invoked from /proc/
Code:
Linux version 2.6.18-8.el5 (brewbuilder@ls20-bc2-14.build.redhat.com) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Fri Jan 26 14:15:21 EST 2007
|
|
|
12-17-2008, 04:18 PM
|
#2
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
Is there any particular reason why you want to compile these packages?
I am not a redhat user but as far as I know redhat provides binary packages that are already compiled for all the supported packages and architectures. You shouldn't need to compile anything unless you want to add custom patches or do something very specific.
|
|
|
12-17-2008, 04:32 PM
|
#3
|
LQ Newbie
Registered: Dec 2008
Posts: 2
Original Poster
Rep:
|
Actually, I do need to compile mysql in order to properly set up some web app I want on my server. However, if someone could point out where I could get a binary version of GCC for my version of redhat, I would be immensely grateful. I do not have any installation CDs.
|
|
|
12-17-2008, 05:38 PM
|
#4
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Quote:
Originally Posted by vic305
Actually, I do need to compile mysql in order to properly set up some web app I want on my server. However, if someone could point out where I could get a binary version of GCC for my version of redhat, I would be immensely grateful. I do not have any installation CDs.
|
I think pretty much any distro comes with GCC. If you do not have a licensed copy of RHEL (Red-Hat Enterprise Linux), then the easiest thing to do is just get a different distro.
If you really like RHEL, then try CentOS (free and legal clone of RHEL)
|
|
|
12-17-2008, 05:58 PM
|
#5
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Rep: 
|
# yum install gcc
|
|
|
12-17-2008, 06:03 PM
|
#6
|
Senior Member
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Rep:
|
Quote:
Originally Posted by vic305
Short version: How do i compile gcc without a previously existing c compiler?
|
You can't compile any software without compiler. So you can't compile compiler without another compiler.
|
|
|
12-17-2008, 09:55 PM
|
#7
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
first you write an assembler in machine code
then use the assembler to write a BETTER assembler
then use the assembler to write a compiler
then use the compiler to write a BETTER compiler
..
..
OR: Just grab an existing compiler.......... 
|
|
|
12-17-2008, 10:15 PM
|
#8
|
Senior Member
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
|
that is an easy one gcc is a library about 30 years ago it came like today in a tar ball extracted it and then you used the c header files. today this is a huge library. oh yeah install tar -xfv glibc. installed.
red hat open you red hat 5 or red hat f enterprise. any yum or the old package manager install the development files. if you are using redhat 5 I doubt because it would be way.old
rpm .org. if you have RHE5 then that is here http://unclean.org/howto/gcchowto.html
this is for redhat. google works hope this helps. do not trust anyone that does not let you be the super user on your machine. root not sudo till you die.
|
|
|
12-17-2008, 10:30 PM
|
#9
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
The gcc compiler should be present in your installation media. There is also the http://rpm.pbone.net website. You can filter for RHEL 5 in the advanced search. When you get to the package, it will probably be from a full repository you can use as a source.
You could also download the mysql source package, configure it the way you want, and use rpmbuild to create the package. This can be done on a workstation that has the library versions, and gcc version you need for RHEL 5. There may be a version of Fedora Core that uses equivalent rpm packages. For example, if you had an SLED 10 server, the rpm packages are the same as OpenSuSE 10.1. So a desktop or laptop with OpenSuSE 10.1 could be used to build a mysql package exactly as it would be done on the server. A running server shouldn't have gcc installed. If your server is compromised, it makes it easier for the cracker to compile their own code (such as a root kit). You may want to keep your gcc & library rpms handy so you can uninstall gcc after you are done.
|
|
|
All times are GMT -5. The time now is 09:10 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|