C compiler cannot create executable, Apache 2.2.17 install on Fedora 18
So I'm the newbie trying to install Apache, everything runs great until I configure. Help is greatly appreciated.
[root@localhost httpd-2.2.17]# ./configure --enable-mods-shared=all --prefix=/usr/local/apache checking for chosen layout... Apache checking for working mkdir -p... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu Configuring Apache Portable Runtime library ... checking for APR... yes setting CC to "gcc" setting CPP to "gcc -E" setting CFLAGS to " -pthread" setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE" setting LDFLAGS to " " Configuring Apache Portable Runtime Utility library... checking for APR-util... yes checking for gcc... gcc checking for C compiler default output file name... configure: error: in `/home/russ/httpd-2.2.17': configure: error: C compiler cannot create executables See `config.log' for more details. |
so what is in config.log ?
|
Welcome to LQ.
How to get gcc to work : # yum install gcc-c++ .. which will also install the dependencies for gcc : glibc-devel glibc-headers kernel-headers. Also suggest : $ yum grouplist # yum install "Development Tools" - |
are you 100% sure that you need the old apache 2.2.17 ?
it is very old older even that the current 2.2.24 build on the apache web site http://httpd.apache.org/download.cgi#apache22 2.4 is in the fedora repos and on the install dvd Also fedora , by default , dose not use "/usr/local" it is not in the system path the default install location on fedora/red hat/ cent is "/var/www/http" /var/www/http/index.html is the "congratulations you installed apache " web page Now i do recommend that one builds from source everything for the first few installs .That way you learn how to install everything and set it up but fedora has a install group to install everything needed Code:
su - it is likely you will need to install along side 4.8 gcc 4.1 |
Quote:
configure:3510: checking for APR configure:3595: result: yes configure:3870: checking for APR-util configure:3955: result: yes configure:4203: checking for gcc configure:4230: result: gcc configure:4462: checking for C compiler version configure:4470: gcc --version >&5 ./configure: line 4472: gcc: command not found configure:4474: $? = 127 configure:4481: gcc -v >&5 ./configure: line 4483: gcc: command not found configure:4485: $? = 127 configure:4492: gcc -V >&5 ./configure: line 4494: gcc: command not found configure:4496: $? = 127 configure:4519: checking for C compiler default output file name configure:4541: gcc -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE conftest.c >&5 ./configure: line 4543: gcc: command not found configure:4545: $? = 127 configure:4583: result: configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:4589: error: in `/home/russ/httpd-2.2.17': configure:4592: error: C compiler cannot create executables See `config.log' for more details. |
Quote:
I am running the 2.2.17 because that is what the book was written with. I am installing as part of class lab assignment. Original text was for Fedore 17 and 2.2.17, however I could not find Fedora 17 ISO and loaded 18. At this point I just need Apache w/ modules to finish the last 4 weeks. I did forget to mention that I am running Fedore on Oracle VM Virtualbox, but I do not think this has an impact other than sluggish GUI performance. |
# 6.
Apache : httpd-2.2.17 is the Fedora 15 version. ISO : All versions 15...18 are available from Fedora. http://dl.fedoraproject.org/pub/fedora/linux/releases/ |
well the error in the above post
shows you did not install the "development tools " Code:
su - that Apache 2.2.17 is older than the current fedora 18 gcc compiler " gcc 4.8 " you might need to hack the Apache source code to get it to build on gcc 4.8 or install gcc 4.3 or gcc 4.1 along side gcc 4.8 and set "alternatives" to the gcc 4.3 or 4.1 version this is a very common issue with fedora Fedora is a fast passed "Research and development " distro that trys to use the "Newest of the NEW " including sometimes BETA testing versions of lib's and programs a lot of programs will not "yet" build ( without hacking ) on the current versions of fedora |
Quote:
|
All times are GMT -5. The time now is 10:41 PM. |