2 Answers
2

The message means what it says. The nginx executable was compiled to expect the PCRE (Perl-compatible Regular Expression) shared library to be available somewhere on LD_LIBRARY_PATH or specified in /etc/ld.so.conf or whatever equivalent library-locating mechanisms apply to your operating system, and it cannot find the library.

You will need to install PCRE - or configure your environment so that nginx will look for the PCRE library where it is installed.

Which platform are you on? Where did you install PCRE?
–
Jonathan LefflerDec 14 '11 at 15:04

any further on this? I'm still having the same problem
–
redrootDec 22 '11 at 11:10

@redroot: In the short-term (to get it working) you can add the directory where PCRE is installed to the LD_LIBRARY_PATH environment variable and try running again. If that works, then you need to investigate /etc/ld.so.conf. If it doesn't work, then you need to check whether Ruby is 32-bit and PCRE is 64-bit, or whether Ruby is 64-bit and PCRE is 32-bit. The mixture won't work. If you have a mixture, reinstall the correct version (bittiness) of one of the products, but PCRE alone is simpler than Ruby plus its extensions. Use file and ldd to analyze binaries and shared libraries.
–
Jonathan LefflerDec 22 '11 at 16:15

As a guy who is working through nginx builds, I'm finding the configure system a bit unflexible. For example, configuring with OpenSSL assumes you want linking to a shared object. Its appears impossible to force static linking to libssl and libcrypto when both the static archive and shared object are present. Careful placement of -Bstatic and -Bshared does not help.
–
jwwDec 17 '13 at 20:41

I had installed PCRE manually before passenger installation (trying to solve another error with that version of passenger) and got this error when tried to start nginx. "sudo ldconfig" helped me too. Thanks a lot!
–
VoldyJan 9 '12 at 17:57

This should be the answer for at least Ubuntu 11
–
Todd BaurJan 16 '12 at 4:10