安装Apache 2.4.17 遇到的问题

来源:互联网 发布:淘宝宝贝摄影 编辑:程序博客网 时间:2024/05/13 15:24

注:本操作CentOS 6.3 32位。

在配置编译httpd参数时:

# ./configure --prefix=/usr/local/apache2 --with-included-apr  --enable-deflate=shared  --enable-expires=shared  --enable-rewrite=shared  --with-pcre

检查编译环境时出现的错误:

configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.

它说是需要把apr和apr-util解压到apache的./srclib/目录里.

解决办法:

# wget http://mirror.esocc.com/apache/apr/apr-1.5.2.tar.gz

# wget http://mirror.esocc.com/apache/apr/apr-util-1.5.4.tar.gz

下载apr和apr-util ,然后解压移到srclib目录下,并把名称中的版本号去掉:

# tar zxvf apr-1.5.2.tar.gz

# mv apr-1.5.2 httpd-2.4.17/srclib/apr

# tar zxvf apr-util-1.5.4.tar.gz

# mv apr-util-1.5.4 httpd-2.4.17/srclib/apr-util

然后在编译环又会报个错:

configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

这是缺少pcrek库,下载编译安装就好了:

# wget http://ncu.dl.sourceforge.net/project/pcre/pcre/8.37/pcre-8.37.tar.gz

# tar zxvf pcre-8.37.tar.gz

# cd pcre-8.37

# ./configure

# make

# make install

装好pcre,就继续编译环境吧。




0 0