通过在maillist的学习,看了很多人的编译过程,特别是一篇编译 2.3.4 alpha 的例子,很受启发.
发现原来是expat的问题.
我的configure:
$ ./configure --prefix=/usr/local/apache2 --bindir=/usr/local/bin --sbindir=/usr/local/sbin --enable-v4-mapped --enable-maintainer-mode --enable-file-cache --enable-cache --enable-disk-cache --enable-so --enable-echo --enable-charset-lite --enable-mime-magic --enable-expires --enable-headers --enable-usertrack --enable-session --enable-session-cookie -enable-ssl --enable-http --enable-dav --enable-info --enable-dav-fs --enable-vhost-alias --enable-imagemap --enable-rewrite --with-included-apr
运行报错,configure failed in srclib/expat.
解决方案:yum install expat-devel,即可
再次运行,报错,不过这次是缺依赖.
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
原来apache httpd 从2.3.x 后不再集成pcre.须自行安装.
下载:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.01.tar.bz2
解压,configure --prefix=/usr/local/pcre --enable-utf8 --enable-pcregrep-libz
make && make install.
然后回到apache httpd 源码包,加上一条 --with-pcre=/usr/local/pcre。即可顺利通过编译.
发现原来是expat的问题.
我的configure:
$ ./configure --prefix=/usr/local/apache2 --bindir=/usr/local/bin --sbindir=/usr/local/sbin --enable-v4-mapped --enable-maintainer-mode --enable-file-cache --enable-cache --enable-disk-cache --enable-so --enable-echo --enable-charset-lite --enable-mime-magic --enable-expires --enable-headers --enable-usertrack --enable-session --enable-session-cookie -enable-ssl --enable-http --enable-dav --enable-info --enable-dav-fs --enable-vhost-alias --enable-imagemap --enable-rewrite --with-included-apr
运行报错,configure failed in srclib/expat.
解决方案:yum install expat-devel,即可
再次运行,报错,不过这次是缺依赖.
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
原来apache httpd 从2.3.x 后不再集成pcre.须自行安装.
下载:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.01.tar.bz2
解压,configure --prefix=/usr/local/pcre --enable-utf8 --enable-pcregrep-libz
make && make install.
然后回到apache httpd 源码包,加上一条 --with-pcre=/usr/local/pcre。即可顺利通过编译.