源碼安裝執(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
·