I just installed Passenger 3.0.11 and nginx and got this error:
Starting nginx: /opt/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
I just installed Passenger 3.0.11 and nginx and got this error:
Starting nginx: /opt/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
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.
I got the same error, and I fixed the problem by running sudo ldconfig
.
Execute below command and restart server again.
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
There are few recommendations, with this I have solved the issue which I had.
ldconfig -v
.bash_profile
and refresh the same with . . bash profile
.updatedb
to refresh the library list.