Centos6 4 nginx啟動錯誤

2021-06-20 19:11:48 字數 1556 閱讀 6097

啟動 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

成功啟動

其他相似錯誤 操作可以借鑑

CentOS安裝nginx並啟動

1 安裝依賴 yum install gcc yum install pcre devel yum install zlib zlib devel yum install openssl openssl devel 2 切換目錄 cd usr local3 建立資料夾 mkdir nginxcd n...

Centos安裝Nginx至啟動

centos安裝nginx 準備安裝包 pcre 8.37.tar.gz nginx 1.12.2.tar.gz 安裝pcre 8.37.tar.gz 2.1 解壓 tar zxvf pcre 8.37.tar.gz 2.2 進入解壓後的資料夾 cd pcre 8.37 2.3 執行命令 confi...

nginx安裝及介紹(centos6 4)

官方 使用的版本是1.8.0版本。nginx 1.8.0.tar.gz 1 需要安裝gcc的環境。yum install gcc c 2 第三方的開發包。pcre pcre perl compatible regular expressions 是乙個perl庫,包括 perl 相容的正規表示式庫。...