首页 > Linux, Nginx, 项目实施 > nginx error while loading shared libraries: libpcre.so.1:
201210月23

nginx error while loading shared libraries: libpcre.so.1:

linux 64位安装nginx后启动出错报以下错误

[root@localhost nginx-1.3.0]# /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 nginx-1.3.0]# ldd $(which /usr/local/nginx/sbin/nginx)
linux-vdso.so.1 => (0x00007fff4d5ff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fea7e357000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fea7e120000)
libpcre.so.1 => not found
libz.so.1 => /lib64/libz.so.1 (0x00007fea7df09000)
libc.so.6 => /lib64/libc.so.6 (0x00007fea7db76000)
/lib64/ld-linux-x86-64.so.2 (0x00007fea7e57d000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007fea7d913000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fea7d70f000)

可以看出 libpcre.so.1 => not found 并没有找到,进入/lib64目录中手动链接下

[root@localhost /]# cd lib64/
[root@localhost lib64]# ln -s libpcre.so.0.0.1 libpcre.so.1

然后启动nginx就ok了

文章作者: iitshare
本文地址:http://www.iitshare.com/error-while-loading-shared-libraries-libpcre-so-1.html
版权所有 © 转载时必须以链接形式注明作者和原始出处!

更多

2 Responses to “nginx error while loading shared libraries: libpcre.so.1:”

  1. #1 网友 回复 | 引用 Post:2013-01-18 17:38

    这条命令是有错的:ln -s libpcre.so.0.0.1 libpcre.so.1
    应该是:ln -s /usr/local/lib/libpcre.so.1 /lib64

发表评论