mac openresty 源码安装 坑

下载openresty源码安装

下载页面http://openresty.org/cn/download.html
下载上一个版本的稳定版 https://openresty.org/download/openresty-1.11.2.5.tar.gz

cd /var/local/software
tar -xvf openresty-1.11.2.5.tar.gz
cd openresty-1.11.2.5
./configure

竟然报错了

./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 的路径,那把路径带过去试试

sudo ./configure -j2 --with-openssl=/usr/local/Cellar/openssl/1.0.2q/
cd /usr/local/Cellar/openssl/1.0.2q \
&& if [ -f Makefile ]; then /Library/Developer/CommandLineTools/usr/bin/make clean; fi \
&& ./config --prefix=/usr/local/Cellar/openssl/1.0.2q/.openssl no-shared  \
&& /Library/Developer/CommandLineTools/usr/bin/make \
&& /Library/Developer/CommandLineTools/usr/bin/make install_sw LIBDIR=lib
/bin/sh: ./config: No such file or directory
make[2]: *** [/usr/local/Cellar/openssl/1.0.2q/.openssl/include/openssl/ssl.h] Error 127
make[1]: *** [build] Error 2
make: *** [all] Error 2

就这个错误折腾好长时间,后来发现openssl的路径是需要源码路径
那下载源码指定路径试试。
https://www.openssl.org/source/
下载解压

tar -xvf openssl-1.0.2q.tar.gz

安装成功

sudo ./configure -j2 --with-openssl=/var/local/software/openssl-1.0.2q
sudo make
sudo make install

一路安装成功

------------------------------------end
一起关注高性能WEB后端技术,关注公众号
在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值