缺少公共庫文件
/home/nginx/sbin/nginx -t
/home/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
1.
ldd /home/nginx/sbin/nginx
linux-vdso.so.1 => (0x00007ffd1e4fa000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8381336000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f83810ff000)
libpcre.so.0 => not found
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f8380c9d000)
libz.so.1 => /lib64/libz.so.1 (0x00007f8380a87000)
libc.so.6 => /lib64/libc.so.6 (0x00007f83806c3000)
/lib64/ld-linux-x86-64.so.2 (0x00007f838155d000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f83804c0000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f83802bc000)
2.
ll libpcre*
lrwxrwxrwx. 1 root root 18 Dec 19 19:09 libpcre16.so -> libpcre16.so.0.2.0
lrwxrwxrwx. 1 root root 18 Dec 19 19:09 libpcre16.so.0 -> libpcre16.so.0.2.0
-rwxr-xr-x. 1 root root 365464 Aug 2 11:08 libpcre16.so.0.2.0
lrwxrwxrwx. 1 root root 18 Dec 19 19:09 libpcre32.so -> libpcre32.so.0.0.0
lrwxrwxrwx. 1 root root 18 Dec 19 19:09 libpcre32.so.0 -> libpcre32.so.0.0.0
-rwxr-xr-x. 1 root root 349072 Aug 2 11:08 libpcre32.so.0.0.0
lrwxrwxrwx. 1 root root 19 Dec 19 19:09 libpcrecpp.so -> libpcrecpp.so.0.0.0
lrwxrwxrwx. 1 root root 19 Dec 19 19:09 libpcrecpp.so.0 -> libpcrecpp.so.0.0.0
-rwxr-xr-x. 1 root root 36424 Aug 2 11:08 libpcrecpp.so.0.0.0
lrwxrwxrwx. 1 root root 21 Dec 19 19:09 libpcreposix.so -> libpcreposix.so.0.0.1
lrwxrwxrwx. 1 root root 21 Dec 19 19:09 libpcreposix.so.0 -> libpcreposix.so.0.0.1
-rwxr-xr-x. 1 root root 11128 Aug 2 11:08 libpcreposix.so.0.0.1
lrwxrwxrwx. 1 root root 16 Dec 19 19:09 libpcre.so -> libpcre.so.1.2.0
lrwxrwxrwx. 1 root root 16 Dec 19 19:09 libpcre.so.1 -> libpcre.so.1.2.0
-rwxr-xr-x. 1 root root 402384 Aug 2 11:08 libpcre.so.1.2.0
3.做連接
[root@test150 lib64]# ln -s libpcre.so.1.2.0 libpcre.so.0
4.
ldd /home/nginx/sbin/nginx
linux-vdso.so.1 => (0x00007fffe9b5d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f25cee71000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f25cec3a000)
libpcre.so.0 => /lib64/libpcre.so.0 (0x00007f25ce9d7000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f25ce576000)
libz.so.1 => /lib64/libz.so.1 (0x00007f25ce360000)
libc.so.6 => /lib64/libc.so.6 (0x00007f25cdf9c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f25cf098000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f25cdd99000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f25cdb95000)
5.測試就正常了
缺少公共庫文件