安装openresty失败的解决

时间:2020-12-30 04:35:26

官网上的安装步骤如下:

tar -xzvf openresty-VERSION.tar.gz
cd openresty-VERSION/
./configure
make
sudo make install

但是我进行到configure这步就报错:

checking for PCRE library ... foundchecking for PCRE JIT support ... foundchecking for OpenSSL library ... not foundchecking for OpenSSL library in /usr/local/ ... not foundchecking for OpenSSL library in /usr/pkg/ ... not foundchecking for OpenSSL library in /opt/local/ ... not found./configure: error: SSL modules require the OpenSSL library.You can either do not enable the modules, or install the OpenSSL libraryinto the system, or build the OpenSSL library statically from the sourcewith nginx by using --with-openssl=<path> option.ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx \...

看来应该把openssl library装好。

具体应该装哪一个呢?看这个文章得知要安装libssl-dev:
http://superuser.com/questions/371901/openssl-missing-during-configure-how-to-fix
如何安装libssl-dev呢?
由于我机器里已经有了libssl1.0.0,所以直接安装libssl-dev时会失败,所以要按如下文章,将其降级后安装。
参考这个文章:http://blog.csdn.net/andy812110/article/details/24842219
安装成功后,可以继续下一步:make