标签:error while loading shared libraries nginx
[root@shwencong ~]# /usr.local/nginx/sbin/nginx -c conf/nginx.conf
sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
从错误看出是缺少libpcre.so.1文件导致
[root@shwencong nginx]# ldd $(which /usr/local/nginx/sbin/nginx)
linux-vdso.so.1 => (0x00007fffd87ff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f320c204000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f320bfcd000)
libpcre.so.1 => not found
libz.so.1 => /lib64/libz.so.1 (0x00007f320bdb6000)
libc.so.6 => /lib64/libc.so.6 (0x00007f320ba22000)
/lib64/ld-linux-x86-64.so.2 (0x00007f320c431000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f320b7aa000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f320b5a6000)
可以看出 libpcre.so.1 => not found 并没有找到,进入/lib64目录中手动链接下
[root@shwencong lib64]# ln -s libpcre.so.0.0.1 libpcre.so.1
然后在启动nginx ok 了
Nginx启动出错 error while loading shared libraries
标签:error while loading shared libraries nginx
原文地址:http://prempeng.blog.51cto.com/5763510/1669424