Compiling nginx in RedHat Linux: PCRE library problem
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.
Related posts:
8 Responses to this entry
Так об этом вроде и в инструкции на сайте Игоря Сысоева написано
1) Написано где?
2) Насколько я понимаю, написано на русском?
1) http://sysoev.ru/nginx/getting_started.html
2) верно
2Alex: а ну, ткни меня носом в описание того, как в редхате скомпилить? Отказываться от mod_rewrite нельзя, а with-pcre – это немного не то…
Упс, прошу прощения.. перепутал немного
Действтиельно, большое спасибо – надо будет попробовать
How do you get the pcre library in the first place? I don’t have a /usr/include/pcre directory…
Great little tip, thanks! It should be noted though, that you need the pcre-devel library installed first.
Thanks cka3o4nik !!! that sorted out a problem I been working on for days!