openresty 最新版本安装异常排查

src/event/ngx_event_openssl.c: In function ‘ngx_ssl_connection_error’:
src/event/ngx_event_openssl.c:2048:21: error: ‘SSL_R_NO_CIPHERS_PASSED’ undeclared (first use in this function); did you mean ‘SSL_R_NO_CIPHERS_SPECIFIED’?
|| n == SSL_R_NO_CIPHERS_PASSED /* 182 */
^~~~~~~~~~~~~~~~~~~~~~~
SSL_R_NO_CIPHERS_SPECIFIED

 

解决方式:

注:openresty在动态加载证书的时候使用的模块需要openssl-1.0.2e版本以上,所以我们需要重新编译openresty。

1.安装openssl

从官网上下载最新版openssl,解压,进入解压目录键入命令行:

./configure --prefix=/usr/local/openssl

make &&make install

2.重新编译openresty

注意接下来很重要,找到openresty解压目录下的bundle/nginx-x-x-x(版本号)/auto/lib/openssl/conf,不同版本的openresty可能位置不太一样,如果没有找到,就在nginx-x-x-x文件夹下搜索“openssl”即可。
打开conf,将里面的所有“.openssl”删除,在删之前你可以看到其所在行表示的是一个路径,记得将“/”也删掉。

然后,在之前已有的编译参数上将关于openssl的参数换为 --with-openssl=/usr/local/openssl。

最后make &&make install 即可。
---------------------
作者:csdncqmyg
来源:CSDN
原文:https://blog.csdn.net/csdncqmyg/article/details/73835354?utm_source=copy
版权声明:本文为博主原创文章,转载请附上博文链接!

posted @ 2018-10-12 01:21  想飞的枫叶  阅读(1709)  评论(0编辑  收藏  举报