jnydjky@jnydjky:/usr/local/nginx/sbin$ ./nginx
./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
找不到pcre库,这个库在 /usr/local/lib 目录,执行:
出现这个问题可能有以下原因:
没有安装 pcre 库
nginx 编译安装时没有指定正确的pcre 地址
pcre 库没有加入到 LD_LIBRARY_PATH
我自己是第二种原因,所以重新编译安装nginx并指定pcre:
./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.38
make
sudo make install
参考链接 :
原文链接:https://blog.csdn.net/guangyacyb/article/details/86508790