安装 nginx-lua-modules 错误

错误:

/usr/local/src/lua-nginx-module-0.10.10/src/ngx_http_lua_module.c: 在函数‘ngx_http_lua_merge_srv_conf’中:
/usr/local/src/lua-nginx-module-0.10.10/src/ngx_http_lua_module.c:1022:37: 错误: 从不兼容指针类型传递第2个参数到‘SSL_CTX_sess_set_get_cb’
                                 ngx_http_lua_ssl_sess_fetch_handler);
                                 ^
从src/event/ngx_event_openssl.h:15:0处导入,
             从src/core/ngx_core.h:83处导入,
             从/usr/local/src/lua-nginx-module-0.10.10/src/ddebug.h:13处导入,
             从/usr/local/src/lua-nginx-module-0.10.10/src/ngx_http_lua_module.c:11处导入:
/usr/local/src/openssl-1.1.0g/.openssl/include/openssl/ssl.h:639:6: 注意: 预期‘struct SSL_SESSION * (*)(struct ssl_st *, const unsigned char *, int,  int *)’但实参具有 ‘struct SSL_SESSION * (*)(struct SSL *, u_char *, int,  int *)’类型
 void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
  ^
cc1: 所有警告都被当作错误处理
make[1]: *** [objs/addon/src/ngx_http_lua_module.o] 错误1

make[1]:退出目录‘/usr/local/src/nginx-1.10.3'
make: *** [build] 错误2

情况:

nginx -V:
--prefix=/etc/nginx --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.39 --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --conf-path=/etc/nginx/nginx.conf --http-uwsgi-temp-path=/etc/nginx/uwsgi_params --http-fastcgi-temp-path=/etc/nginx/fastcgi_params --http-scgi-temp-path=/etc/nginx/scgi_params --with-http_v2_module --with-http_stub_status_module --with-http_gzip_static_module --with-ipv6 --with-openssl=/usr/local/src/openssl-1.1.0g

在这种情况下, 执行 make && make install 命令成功

 --add-module=/usr/local/src/lua-nginx-module-0.10.10   --add-module=/usr/local/src/ngx_devel_kit-0.3.0

但是添加 lua 模块后, 出现错误。

点赞
用户7393428
用户7393428

将下面翻译成中文并且保留原本的 markdown 格式,change version OpenSSL 1.1.0 to OpenSSL 1.0.2

将 OpenSSL 版本从 1.1.0 更改为 1.0.2。

2017-11-07 07:29:14