Apache安装; libpcre错误

在Ubuntu 11.10上安装Apache时,出现以下错误:

configuration:错误:未findAPR。 请阅读文档。

我按照这里的说明,然后,我得到下面的错误:

configuration:错误:pcre-config找不到libpcre。 PCRE是必需的,可从http://pcre.org/获得

我做错了什么,我该如何解决?

1.从PCRE.org下载PCRE

2.用前缀编译并安装它:

./configure --prefix=/usr/local/pcre make make install 

3.回到你的Apache安装位置,用PCRE编译Apache:

 --with-pcre=/usr/local/pcre 

对于我(Fedora Linux)来说,安装pcre-devel就足够了: yum install -y pcre-devel 。 之后甚至不必使用--with-pcre

我是其他问题与pcre在CentOS编译apache2。 我安装了pcre在其他位置“/ custom / location / pcre”,并且配置命令抛出以下错误

 configure: error: Did not find pcre-config script at "/custom/location/pcre" 

解决它改变国旗--with-pcre=/custom/location/pcre--with-pcre=/custom/location/pcre/bin/pcre2-config

RHEL 3中,不需要设置参数--with-pcre指向pcre-config。 只需要路径

我的配置命令:

 ./configure --prefix=/usr/local/apache2 --with-pcre=/usr/local/pcre