安装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
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 APR library
Platform: i686-pc-linux-gnu
checking for working mkdir -p... yes
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