Compiling nginx in RedHat Linux: PCRE library problem
  • Posted in: Uncategorized
  • Tags:
30 Aug2006

If you will try to compile nginx in Redhat Linux, you can get following error even if you have pcre-devel package installed:

1
2
3
4
5
6
7
8
9
10
Configuration summary
  + threads are not used
  + PCRE library is not found
....
....
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, 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.
</path>

If you are experiencing this small problem, you should simply use following parameter of configure script:

1
# ./configure --with-cc-opt="-I /usr/include/pcre"

And voila!

1
  + using system PCRE library

Now it can see and will use system PCRE library.