If you get below error while starting nginx
- error:
nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
nginx couldn’t find the library by itself.
Specify the path of libpcre.so.1 in LD_LIBRARY_PATH and nginx will work fine
How to do specify the path?
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<absolute-path-of-libpcre.so.1>