PCRE error in installation of Apache

On Compiling Apache from the source code I got the below error

checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
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
checking how to run the C preprocessor… gcc -E
checking for gcc option to accept ISO C99… -std=gnu99
checking for pcre-config… false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

Solution

1. Download PCRE from PCRE.org

2. Compile it with a prefix and install it:

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

3. Go back to where your Apache installation is and compile Apache with PCRE:

–with-pcre=/usr/local/pcre

Leave a Reply

Your email address will not be published. Required fields are marked *

*