安裝Nginx時遇到的pcre庫問題

2021-07-27 17:01:39 字數 617 閱讀 9099

在redhat4.4上安裝nginx,提示說無法找到pcre庫,可能是庫的版本不對,無法識別。

由於誤操作,在沒有備份的時候,直接輸入命令 「

rpm -e pcre –nodeps

」,導致系統把/lib64目錄下的libpcre.so.0被刪除,而很多程式都依賴這個so庫,比如grep。網上很多說可以通過原始碼安裝pcre庫,然後再軟連線到libpcre.so.0到編譯後的lib對應庫上,但是在安裝過程中需要執行configure生成makefile,提示沒有pcre.so.0庫,命令出錯。報錯結果像這樣:

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

wget

rpm -ivh pcre-7.8-6.el6.x86_64.rpm

其他系統可以到 **上找對應的安裝包。有了libpcre.so.0,就可以安裝pcre最新的庫。

解壓之後執行configure,make,make install完成安裝。

編譯安裝Nginx和pcre

編譯安裝ngnix和pcre 一 首先要安裝pcre 他作用是讓ngnix支援rewrite功能 yum y install make zlib zlib devel gcc c libtool mkdir p home oldboy tools cd home oldboy tools wget ...

編譯nginx的時候報錯 需要安裝PCRE

configure prefix mynginx 本地編譯nginx的時候 報錯 提示需要安裝pcre 錯誤資訊 解壓到路經 cd pcre2 10.32.configure prefix usr local詳細操作流程 cd usr local src tar pcre2 10.32.tar cd...

nginx 安裝遇到的問題

在解壓 source 後的目錄下,執行如下命令 一開始沒有加 with openssl usr bin openssl 這個引數,會報錯,說找不到 openssl,我明明是安裝的,上網找了一下,才發現安裝的 openssl 的執行檔案不在 configure 預設搜尋的幾個目錄下。加上這個引數後,就...