Shell代碼
[root@tmsapp65 conf]# /usr/local/nginx/sbin/nginx
/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
確認已經安裝PCRE:
Shell代碼
[ew69@SCLABHADOOP01 lib]$ cd /lib
[ew69@SCLABHADOOP01 lib]$ ls *pcre*
libpcre.so.0 libpcre.so.0.0.1
[hadoop@SCLABCLUS01 nginx]$ find / -type f -name *libpcre.so.*
添加軟鏈接:
Shell代碼
[root@tmsapp65 lib]$ ln -s /lib/libpcre.so.0.0.1 /lib/libpcre.so.1
前面在一般的linux上可以解決此問題.
注: 在有的操作系統上面,安裝pcre后,安裝的位置為/usr/local/lib/*pcre*
在redhat 64位機器之上有這樣的情況.
在redhat 64位機器上, nginx可能讀取的pcre文件為/lib64/libpcre.so.1文件.
所以在改用下面的軟連接:
Shell代碼
[root@tmsapp65 ~]$ ln -s /usr/local/lib/libpcre.so.1 /lib64/