Linux - NewbieThis 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
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.
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.
I am pretty much a Linux newbie, so I appreciate your help.
I am trying to setup Apache on Mandrake 9.1 using the KDE desktop. I have been able to download and extract the files, but I am having a problem compiling. When I use the ./configure command I get an error: "C compiler cannot create executables".
Here is the exact command I used:
$ CC="pgcc" \
./configure --prefix=/sw/pkg/apache
(I got this right off the Apache Project Site)
OK. I know the CC part tells the system which C Compiler to use, so maybe I am using the wrong one.
Distribution: Mandrake as base, most software hand rolled
Posts: 80
Rep:
Re: New User, ./configure error, installing Apache2
Quote:
Originally posted by cfitzgerald problem compiling. When I use the ./configure command I get an error: "C compiler cannot create executables".
Here is the exact command I used:
$ CC="pgcc" \
./configure --prefix=/sw/pkg/apache
OK. I know the CC part tells the system which C Compiler to use, so maybe I am using the wrong one.
You are indeed possibly using the wrong compiler. Check whether there is such a beast as 'pgcc' on your system with 'which pgcc'. If that does not return a file path, you don't have pgcc in your path, and configure will not find the compiler.
If 'which gcc' does return a file path (e.g. /usr/bin/gcc), then gcc is your compiler, and things should start rolling with CC=gcc.
If that does not help, have a look in the config.log file, which details the exact commands that led to the error, and the system error message that occured.
Distribution: Mandrake as base, most software hand rolled
Posts: 80
Rep:
Quote:
Originally posted by cfitzgerald
$ which gcc
which: no gcc in (/usr//bin:/bin:/usr/bin::/usr/local/bin:/usr/X11R6/bin:/usr/games:/home/cd_789/bin)
Does this mean I have to C Compiler on the system. If that is true then why do I see this when I use the CC="gcc" option before ./configure:
checking for gcc... gcc
It does look like you're compiler-less. The configure finds gcc because you told it the compiler is gcc. It would bomb out later when it tries to compile a test program.
Quote:
Could you also explain what '$PATH' is...I am guessing it like a Windows Environment variable like %SystemRoot% or something.
$PATH is indeed an environment variable. It lists the directories your shell will look in for executables. You can set it with setenv for a csh like shell or export VARIABLE=... for a ksh/bash like shell.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.