Nginx 启动出错 error while loading shared libraries: libpcre.so.1

作者:佚名 上传时间:2019-05-22 版权申诉

在 centos 6.5  64位上编译安装nginx1.63语法检查出错
[root @localhost conf]# /usr/local/nginx/sbin/nginx -t

/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory

从错误看出是缺少lib文件导致,进一步查看下
[root @localhost conf]# ldd $(which /usr/local/nginx/sbin/nginx)
linux-gate.so.1 =>  (0x0071b000)
libpthread.so.0 => /lib/libpthread.so.0 (0×00498000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0×00986000)
libpcre.so.1 => not found
libcrypto.so.6 => /lib/libcrypto.so.6 (0×00196000)
libz.so.1 => /lib/libz.so.1 (0×00610000)
libc.so.6 => /lib/libc.so.6 (0x002d7000)
/lib/ld-linux.so.2 (0x006a8000)

libdl.so.2 => /lib/libdl.so.2 (0x008c3000)

可以看出 libpcre.so.1 => not found 并没有找到,

进入/lib64目录中手动链接下 #32位在/lib下
[root @localhost lib64]# ln -s libpcre.so.0.0.1 libpcre.so.1

[root @localhost lib]# /usr/local/nginx/sbin/nginx -t

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

然后在启动nginx  ok 了

/usr/local/nginx/sbin/nginx -t[root @localhost lib]# ps -ef |grep nginx
root      9539     1  0 19:06 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
www       9540  9539  0 19:06 ?        00:00:00 nginx: worker process



本文转自 boy461205160 51CTO博客,原文链接:http://blog.51cto.com/461205160/1735651

免责申明:文章和图片全部来源于公开网络,如有侵权,请通知删除 server@dude6.com

用户评论
相关推荐
Nginx 启动出错 error while loading shared libraries: libpcre.so.1
在 centos 6.5  64位上编译安装nginx1.63语法检查出错 [root @localhost conf]# /usr/local/nginx/sbin/
启动 nginx 时报错:error while loading shared libraries:
Nginx 启动出错 error while loading shared libraries: libpcre.so.1error while loading shared l
error while loading shared libraries: libpcre.so.1: cannot open shared object fi
执行启动nginx:/usr/local/nginx/sbin/nginx 错误:/usr/local/nginx/sbin/nginx: error while loa
error while loading shared libraries xx.so处理方法
一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误, 比如: tmux: error while loading shared libraries: libevent-1.4.s
PDF
45KB
2021-01-16 03:32
安装ImageMagick出现error while loading shared libraries的解决方法
主要介绍了安装ImageMagick出现error while loading shared libraries的解决方法,是ImageMagick安装与运行中经常出现的问题,需要的朋友可以参考下
PDF
30KB
2020-11-22 00:01
MYSQL之error while loading shared libraries libtinfo.so.5cannot open shared o
MYSQL之 error while loading shared libraries: libtinfo.so.5: cannot open shared objectfile: No such f
TXT
23B
2021-04-07 10:07
解决启动MongoDB错误error while loading shared libraries libstdc++.so.6cannot open s
本文提供了解启动MongoDB时提示:error while loading shared libraries: libstdc++.so.6: cannot open shared object f
PDF
30KB
2020-09-15 02:20
解决启动MongoDB错误error while loading shared libraries libstdc++.so.6cannot open s
启动MongoDB时,提示: error while loading shared libraries: libstdc++.so.6: cannot open shared object file:
PDF
39KB
2020-12-17 10:52
解决启动MongoDB错误error while loading shared libraries libstdc++.so.6cannot open s
启动MongoDB时,提示:error while loading shared libraries: libstdc++.so.6: cannot open shared object file:
pdf
43.54 KB
2021-09-01 18:30
error while loading shared libraries的解決方法
在linux下运行程序时,发现了error while loading shared libraries这种错误,一时间不知道解决办法,在网上搜索,终于解决了: ./te