The HTTP rewrite module requires the PCRE library during the Nginx compilation. The PCRE package contains Perl Compatible Regular Expression libraries useful for implementing regular expression pattern matching.
If PCRE package is not installed on the server, NGINX installation will fail with the following message:
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
./configure: the HTTP rewrite module requires the PCRE library.
You can disable the module by using --without-http_rewrite_module
or install the PCRE library into the system,
or build the PCRE library statically from the source with nginx
by using--with-pcre=<path> option.
How to Install the PCRE library?
1) SSH to the server and go to a temporary directory
# cd /usr/local/src
2) Download PCRE:
# wget http://downloads.sourceforge.net/pcre/pcre-8.10.tar.bz2
3) Unpack and change to the pcre directory
# tar -jxf pcre-8.10.tar.bz2
# cd pcre-8.10
4) Confiure PCRE:
# ./configure
5) Create the installation files and install PCRE
# make
# make install
Once done, you should be able to install Nginx with the HTTP rewrite module.
Comments are closed.