mac os 下openresty源码安装 出错的解决

源码安装执行到
./configure
出错:

./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

然后又出错:

./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 \...

网上有人说解决方法是:告诉他openssl位置(错误的解决方法)

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

但是,不好使。

正确的解决方法应该是:用--with-openssl 告诉它的是源码位置
https://www.openssl.org/下载了最新的,openssl.1.0.2r版本,到bundle目录里:

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

然后 make
然后 sudo make install
·

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容