Centos6.4 nginx启动错误

启动 nginx时 出现以下错误

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

输入ldd $(which /usr/local/nginx/sbin/nginx)

得到

linux-vdso.so.1 => (0x00007fff48ff0000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0×0000003065800000)
libpcre.so.1 => not found
libssl.so.6 => /lib64/libssl.so.6 (0×0000003067000000)
libcrypto.so.6 => /lib64/libcrypto.so.6 (0×0000003066400000)
libdl.so.2 => /lib64/libdl.so.2 (0×0000003063000000)
libz.so.1 => /lib64/libz.so.1 (0x0000003063c00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003062c00000)
libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x0000003066c00000)
libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x0000003069c00000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0×0000003068800000)
libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0×0000003069000000)
/lib64/ld-linux-x86-64.so.2 (0×0000003062800000)
libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x000000306a800000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003067c00000)
libresolv.so.2 => /lib64/libresolv.so.2 (0×0000003068400000)
libselinux.so.1 => /lib64/libselinux.so.1 (0×0000003064400000)
libsepol.so.1 => /lib64/libsepol.so.1 (0×0000003064000000)


可以看出 libpcre.so.1 => not found 并没有找到,进入/lib目录中手动链接下(这里的/lib目录指的是系统的根目录下面的lib目录)


输入命令:64位系统 [root@localhost lib]# ln -s /usr/local/lib/libpcre.so.1 /lib64


成功启动


其他相似错误 操作可以借鉴

你可能感兴趣的:(linux,nginx,centos,64位,centos6.4)