Apache安装配置找不到PCRE?(找不到libpcre的pcre-config)


9

这些是有关如何在Linux上安装Apache的要求和说明。 http://httpd.apache.org/docs/current/install.html

所以,我已经安装了一切(c++ compileraprapr-util)要能够正确地安装Apache。

剩下的唯一东西是PCRE,我已经安装了它,并且它位于我的 /usr/local/src/pcre-8.32

在尝试sudo ./configure --with-included-apr获取此错误时:

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

我究竟做错了什么?

Answers:


10

您的系统上未安装PCRE devel软件包。首先安装pcre-devel

sudo yum install pcre-devel -y

然后运行

sudo ./configure --with-included-apr

默认情况下,它将自动提取pcre。


9

这解决了。

首先,我安装了PCRE /usr/local/pcre,使用

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

然后用安装apache

./configure --with-included-apr --with-pcre=/usr/local/pcre
make
sudo make install

0

我通过在Apache配置中提供路径解决了它

./configure \
--with-included-apr \
--with-pcre=/usr/local/pcre/bin/pcre-config 

由于编译器会在预配置文件中查找配置设置,因此我们必须提供预配置文件的确切位置。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.