LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 05-15-2003, 03:40 PM   #1
Rgamboa
LQ Newbie
 
Registered: May 2003
Location: NYC
Distribution: RH linux 8.0
Posts: 19

Rep: Reputation: 0
how can I start gcc after install


Hi all I recently downloaded the gcc compile and installed it from an rpm. When I start to compile it give me this error message.
Checking for cygwin environment...... no
Checking for mingw32 environment....... no
Checking for working sed ....... sed
Checking host system type ..... i686-pc-linux-gnulibc1
Checking for gcc ..... gcc
Checking whether the C Compiler (gcc) works ....... no
configure: error: installation or configuration problem: C compiler cannot create executables.

Can anybody tell me what is going on. I am new to the RH 8
I have installed the gcc compile off a rpm.
 
Old 05-15-2003, 03:59 PM   #2
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
hmmm. your post is a little confusing. Did you:

$rpm -ivh gcc*.rpm # I assume that is what you mean when you say you *compiled* and installed from rpm??? Or was this a src.rpm??

Are you then trying to compile a C program with gcc and getting the errors or are those errors from trying to rpm gcc??
 
Old 05-15-2003, 04:02 PM   #3
Rgamboa
LQ Newbie
 
Registered: May 2003
Location: NYC
Distribution: RH linux 8.0
Posts: 19

Original Poster
Rep: Reputation: 0
sorry for the confusion

Yes I installed the gcc from an rpm successfully and I thought I could compile a php tar file but I get that error
 
Old 05-15-2003, 04:18 PM   #4
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
ok...I don't no much about compiled programming, however looking at the error messages you are getting I have to ask:
1. Is php a compiled lang?? # I thought it was interpreted, but I never even looked at it...so...if it is...
2 Does gcc handle php # I know it will compile C C++ ada, Fortran etc...but the man pages I just cruised thru make no mention of php.
3. If the answer to both q's above are yes then it looks to me like you are missing some important files OR gcc was corrupted somehow during install.
 
Old 05-15-2003, 04:41 PM   #5
Rgamboa
LQ Newbie
 
Registered: May 2003
Location: NYC
Distribution: RH linux 8.0
Posts: 19

Original Poster
Rep: Reputation: 0
thank you

I will look into it some more. I got a long question for you.
What if I download the php rpm for apache and install it where would the php files go (to what directory). I need to configure php to run in Apache since I have all my web page in php.

When I did the installation of RH 8 apache is installed in the /etc/httpd/conf/httpd.conf

How will I get apache to know where the php files are?

Thank for your time
 
Old 05-15-2003, 04:45 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
He isn't trying to compile php pages he is trying to install php.

Yes! Go with the rpms that is what they are designed for. After you have installed the rpm you will need to add a LoadModule and an AddType line to your httpd.conf file.
 
Old 05-16-2003, 06:24 AM   #7
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
Quote:
Originally posted by david_ross
He isn't trying to compile php pages he is trying to install php.

Yes! Go with the rpms that is what they are designed for.
Good enough...I have no idea what php is used for..heh, never had the need I guess. However, while I was googleing I did notice an awful lot of talk concerning a php.rpm...hmmmmm, So he was rpm'ing gcc to compile php (ahhh, now I see)

I'm sure somewhere on this site there has to be a recomendation to use rpms whenever possible (on an rpm based distro), however I read a ton of posts here everyday that show someone using source installs on their redhat box and they are having a hell of a time making it work...I guess for the newer user it must be confusing. They want a certain piece of software and so the figure they are going to need to *make* it. Plus I'm sure the RH/MDK crowd get even further afield when they read about all the slackers that frequent here and the instructions appear to suggest that the way one installs new software is with the make util./gcc...etc. oh well, if anyone is reading this thread...use rps if you have an rpm based distro.
 
Old 05-16-2003, 07:07 AM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
I agree - use rpms if you have an prm distro unless you need the program to be compiled differently from the default. The reason most people have problems compiling programs on RedHat is that the appications used for compiling are listed under a section called "Software Devlopment" Most people therefore assume that there is no need to install them unless they are going to develop software and they therefore can't compile software when neccessary.
 
Old 05-16-2003, 07:19 AM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
I don't agree, and guess this thread is as good as any to start a "RPM vs source" debate.

To me, RPM's create problems amongst themselves so bad that it isn't worth the seldom "ease" involved in installing them. You nearly always have to download a package management tool to satisfy dependencies. More than that, you don't (easily) get packages optimized for your architecture/needs.

RPM's are really more of a waste of time and can even be more of a hassle at times than source packages. They create a false sense of accomplishment/security that you are a linux guru because you can type:
rpm -ivh packagename.rpm

Source packages however are much more versatile, much more common, come (sometimes/usually) in a smaller package, run into MUCH less dependendencies, satisfy more dependencies as well, and just overall give a much less of a headache (in the long run).

The happy medium, even though I've never used it (yet) would be portage. Gentoo's package management system combines the ease of a single install application manager:
emerge mplayer
And downloads/installs mplayer from source tailored to your needs. I really think it's the best thing to have come about for package management in linux, and wish it'd get more widespread use (like RPM has, and RPM sucks).

Anyway, enough of my rant... RPM sucks IM-not-so-humble-in-this-situation-O



www.apachetoolkit.com

Cool
 
Old 05-16-2003, 07:55 AM   #10
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
Quote:
Originally posted by MasterC
I don't agree, and guess this thread is as good as any to start a "RPM vs source" debate.

To me, RPM's create problems amongst themselves so bad that it isn't worth the seldom "ease" involved in installing them. You nearly always have to download a package management tool to satisfy dependencies. More than that, you don't (easily) get packages optimized for your architecture/needs.

RPM's are really more of a waste of time and can even be more of a hassle at times than source packages. They create a false sense of accomplishment/security that you are a linux guru because you can type:
rpm -ivh packagename.rpm

Source packages however are much more versatile, much more common, come (sometimes/usually) in a smaller package, run into MUCH less dependendencies, satisfy more dependencies as well, and just overall give a much less of a headache (in the long run).

The happy medium, even though I've never used it (yet) would be portage. Gentoo's package management system combines the ease of a single install application manager:
emerge mplayer
And downloads/installs mplayer from source tailored to your needs. I really think it's the best thing to have come about for package management in linux, and wish it'd get more widespread use (like RPM has, and RPM sucks).

Anyway, enough of my rant... RPM sucks IM-not-so-humble-in-this-situation-O

WHAT !!!!!

I won't argue that RPM has it's share of issues but it is sub-optimal at best to try to install source on an rpm machine (absolutely possible, but difficult)...I spend a few hours every week talking a new user down after he tried to install a tar.gz pkg instead of a common rpm. rpm is *not* the be all end all, but if you couple it with apt4rpm you can accomplish a lot. I agree it will not solve all software issues, but for most desktop hobbists they may never need another tool. If you want to learn how linux ticks then yes at some point I suggest one should seek out raw code, compile/make it...but leave that until you know what a tarball is.
 
Old 05-16-2003, 07:59 AM   #11
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
his compiler isn't working.
i've gotten that error before, but i can't remember
what stuff was missing, probably some header rpm's,
maybe it's glibc development rpm or something like that

you could still search on "C compiler cannot create executables"
 
Old 05-16-2003, 11:06 AM   #12
Rgamboa
LQ Newbie
 
Registered: May 2003
Location: NYC
Distribution: RH linux 8.0
Posts: 19

Original Poster
Rep: Reputation: 0
thanks, I tried installing the php rpm but I get failed depend... err
most of my web pages are php and without the modules the webserver serves them as plain text. I tried reinstalling the gcc rpm but it tells me that it is installed. Yet I tried to compile the php.tar.gz file and I get err message that the C compiler can't create exe.
Where can I find the gcc after the rpm install. what commands can I check to see if it is running
 
Old 05-16-2003, 12:39 PM   #13
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
gcc isn't a server so you can't "see if it is running" it is a program that is used to compile other prgrams from source.

typing:
whereis gcc

should confirm that it exists but that has already be confirmed by the configure script. The chances are that you don't have write access to the compilation directory or you don't have all of the required development libraries required.

If I was you I would use the RH CDs to install ALL of the "software development" section. This should cover most of your compile problems in the future too. Like I said (sorry to disagree MasterC ) RPMs are usually fine for most purposes. I grant you that they aren't optimised or anything but they are much easier to install and even if you do get failed dependancies they can usually be solved by installing another package or two.

In all honesty though I mix and match depending on what is available and I have yet to run into problems with any of my systems !

Good luck Rgamboa
 
Old 05-16-2003, 03:24 PM   #14
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I have to agree with MasterC,

rpm's are terrible. Along with MasterC's points, I have to add that rpm's install config files in seemingly arbitrary locations which are at the whim of the person who created the rpm. They allow no customization of the installed program, however the rpm wasw compiled -> that is the set of features you have to live with whether it is lacking something you need, or contains every feature making the app way larger than it needs to be.

Also, satisfying the sometimes endless list of dependancies can lead you so far away from what you were trying to install that after awhile you've forgotten

It is really not that hard to install from source, and it affords you the ability to install the files where you want them, include only the features you want, and optimize the software for your system (so it runs faster....)

In your specific case, it is not difficult to install apache and php together from source, and there are myriad tutorials and howto's out there that document this very task.
 
Old 05-16-2003, 11:22 PM   #15
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Quote:
Originally posted by BigNate
WHAT !!!!!

I won't argue that RPM has it's share of issues but it is sub-optimal at best to try to install source on an rpm machine (absolutely possible, but difficult)...I spend a few hours every week talking a new user down after he tried to install a tar.gz pkg instead of a common rpm. rpm is *not* the be all end all, but if you couple it with apt4rpm you can accomplish a lot. I agree it will not solve all software issues, but for most desktop hobbists they may never need another tool. If you want to learn how linux ticks then yes at some point I suggest one should seek out raw code, compile/make it...but leave that until you know what a tarball is.


Even with apt4rpm (which still is far from portage) the user has their share of problems. One major one being that it still uses RPM which breaks the system more often than it helps. Too many times you get corrupted rpm db's and "for the n00b" this usually means a new install. Not too efficient if you ask me

Cool
 
  


Reply



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
How to install GCC ??? c0nsur Linux - Newbie 1 01-09-2005 07:21 PM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM
how to install GCC BadTaste Linux - Newbie 15 08-07-2004 01:20 PM
how to install gcc big_bailey Linux - Software 3 07-23-2004 12:47 AM
Must have gcc to install gcc? thafusion Linux - Software 4 05-28-2004 10:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:44 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
Open Source Consulting | Domain Registration