天天看點

安裝httpd-2.2.15.tat.gz碰到的編譯問題

安裝httpd-2.2.15.tat.gz

cd httpd-2.2.15

./configure --prefix=/usr/local/apache --enable-module=so && make && make install

報錯如下:

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... reconfig

configuring package in srclib/apr now

Configuring APR library

Platform: i686-pc-linux-gnu

APR Version: 1.3.8

checking for chosen layout... apr

checking for gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

Applying APR hints file rules for i686-pc-linux-gnu

  setting CPPFLAGS to "-DLINUX=2"

  adding "-D_REENTRANT" to CPPFLAGS

  adding "-D_GNU_SOURCE" to CPPFLAGS

(Default will be unix)

checking whether make sets $(MAKE)... yes

checking how to run the C preprocessor... /lib/cpp

configure: error: in `/localdisk/apache_php_mysql/httpd-2.2.13/srclib/apr':

configure: error: C preprocessor "/lib/cpp" fails sanity check

See `config.log' for more details.

configure failed for srclib/apr

問題是C編譯器問題 ,解決方法: yum install gcc

本文轉自 holy2009 51CTO部落格,原文連結:http://blog.51cto.com/holy2010/424246

繼續閱讀