mac os 下openresty源碼安裝 出錯(cuò)的解決

源碼安裝執(zhí)行到
./configure 時(shí)
出錯(cuò):

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx \...

解決方法:

brew update
brew install pcre openssl

然后又出錯(cuò):

./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.

ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx \...

網(wǎng)上有人說解決方法是:告訴他openssl位置(錯(cuò)誤的解決方法)

./configure --with-openssl=/usr/local/Cellar/openssl/1.0.2r

但是,不好使。

正確的解決方法應(yīng)該是:用--with-openssl 告訴它的是源碼位置
https://www.openssl.org/下載了最新的,openssl.1.0.2r版本,到bundle目錄里:

./configure --with-openssl=bundle/openssl-1.0.2r

然后 make
然后 sudo make install
·

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容