nginx无法启动error while loading shared libraries: libpcre.so.0

今天启动nginx报如下错误:

./nginx: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory

请问这是怎么回事,如何解决?

已邀请:

Ansible - 项目实施 系统工程师

自己找到解决方案了,就是因为缺少pcre  pcre-devel 的lib包,具体情况如下:
[attach]1796[/attach]
[root@bj-web1 sbin]# ls /lib64/libpcre.so.1
/lib64/libpcre.so.1
[root@bj-web1 sbin]# cd /lib64/
[root@bj-web1 lib64]# ln -s ./libpcre.so.1 ./libpcre.so.0
[root@bj-web1 lib64]# cd
[root@bj-web1 ~]# cd /etc/nginx/sbin/
[root@bj-web1 sbin]# ls
dso_tool nginx
[attach]1797[/attach]
[root@bj-web1 sbin]# ./nginx 
[root@bj-web1 sbin]# ps aux |grep nginx
root 6920 0.0 0.0 184796 1264 ? Ss 21:41 0:00 nginx: master process ./nginx
apache 6921 1.3 0.2 226892 41588 ? S 21:41 0:00 nginx: worker process
apache 6922 1.6 0.2 226892 41588 ? S 21:41 0:00 nginx: worker process
apache 6923 2.3 0.2 226892 41588 ? S 21:41 0:00 nginx: worker process
apache 6924 1.3 0.2 226892 41588 ? S 21:41 0:00 nginx: worker process
apache 6925 1.0 0.2 226892 41588 ? S 21:41 0:00 nginx: worker process
apache 6926 2.3 0.2 226892 41588 ? S 21:41 0:00 nginx: worker process
apache 6927 1.3 0.2 226892 41588 ? S 21:41 0:00 nginx: worker process
apache 6928 2.3 0.2 226892 41588 ? S 21:41 0:00 nginx: worker process
apache 6929 0.0 0.0 187012 1768 ? S 21:41 0:00 nginx: cache manager process
apache 6930 0.0 0.0 187012 1768 ? S 21:41 0:00 nginx: cache loader process
root 6933 0.0 0.0 112644 948 pts/2 S+ 21:41 0:00 grep --color=auto nginx
[root@bj-web1 sbin]#
如上已经ok。

要回复问题请先登录注册