nginx: error while loading shared libraries: libpcre.so.1

I bumped into the next error in Nginx.

$./nginx
./nginx: error whereas loading shared libraries: libpcre.so.1: can't open shared object file: No such file or listing
$

Should you get the above error whereas beginning Nginx, this is easy methods to repair it.

This occurs due to the next three causes.

  • PCRE shouldn’t be put in
  • Nginx shouldn’t be compiled and put in utilizing pcre
  • PCRE library shouldn’t be set LD_LIBRARY_PATH

There are a number of methods to troubleshoot and resolve this difficulty. Let’s perceive the error and repair it accordingly.

nginx: error whereas loading shared libraries: libpcre.so.1

Nginx is on the lookout for a file libpcre.so.1 which falls underneath the PCRE library and normally put in on UNIX.

Let’s discover libpcre.so.1 use search

$discover / -name libpcre.so.1 
/usr/native/lib/libpcre.so.1 
$

Okay so I’ve this file which implies PCRE is already put in and can proceed to the following troubleshooting step.

Be aware: If you aren’t getting any outcomes, you may want to put in PCRE utilizing the command beneath.

yum set up pcre

If you do not have root privileges, you’ll be able to ask the system administrator to put in it.

Now, let’s set it up LD_LIBRARY_PATH as we may see libpcre.so.1 is obtainable underneath /usr/native/lib

$export LD_LIBRARY_PATH=/usr/native/lib:$LD_LIBRARY_PATH

Launch Nginx, it must be now.

Fascinated about studying Nginx? Then view this course.

Leave a Comment

porno izle altyazılı porno porno