启动nginx发现 nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 遂检查pcre的安装,由于是在测试安装脚本,遂检查安装是否成功,从脚本运行来看,是成功编译了的,后来又重新编译pcre configure 正常 make 正常 make install 出错如下 test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
/usr/bin/install -c -m 644 pcre.h pcrecpparg.h pcre_stringpiece.h '/usr/local/include'
处理办法 rm /usr/local/share/man/man3/pcre* -rf make clean make install 立即OK,说明刚才的prce安装是没有问题的
下面查看nginx的lipcre问题 find / -name libpcre.so.1 /usr/local/lib/libpcre.so.1 ldconfig -v|grep pcre ldconfig: Path `/usr/local/lib' given more than once 报错了 libpcrecpp.so.0 -> libpcrecpp.so.0.0.0 libpcre.so.1 -> libpcre.so.1.0.0 libpcreposix.so.0 -> libpcreposix.so.0.0.0 libpcre.so.0 -> libpcre.so.0.0.1 libpcrecpp.so.0 -> libpcrecpp.so.0.0.0 libpcreposix.so.0 -> libpcreposix.so.0.0.0
cat /etc/ld.so.conf include ld.so.conf.d/*.conf /usr/local/include /usr/local/lib 提示多了这行,删除掉 ldconfig -v|grep pcre libpcrecpp.so.0 -> libpcrecpp.so.0.0.0 libpcre.so.1 -> libpcre.so.1.0.0 libpcreposix.so.0 -> libpcreposix.so.0.0.0 libpcre.so.0 -> libpcre.so.0.0.1 libpcrecpp.so.0 -> libpcrecpp.so.0.0.0 libpcreposix.so.0 -> libpcreposix.so.0.0.0
再次启动nginx,则OK
总结:上面的问题其实是pcre的动态库路径不对,其实无需编译pcre,为画蛇添足的步骤。pcre再次编译出问题是由于之前安装过的,写man目录文件失败导致。 |