正常运行的nginx 添加lua-module报错

nginx 编译参数:

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

这是正确的,在这个基础上加上下面的add modules

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

configure是可以的,make 就出错了。错误如下:

/usr/local/src/lua-nginx-module-0.10.10/src/ngx_http_lua_module.c: In function ‘ngx_http_lua_merge_srv_conf’:
/usr/local/src/lua-nginx-module-0.10.10/src/ngx_http_lua_module.c:1022:37: error: passing argument 2 of ‘SSL_CTX_sess_set_get_cb’ from incompatible pointer type [-Werror]
                                     ngx_http_lua_ssl_sess_fetch_handler);
                                     ^
In file included from src/event/ngx_event_openssl.h:15:0,
                 from src/core/ngx_core.h:83,
                 from /usr/local/src/lua-nginx-module-0.10.10/src/ddebug.h:13,
                 from /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: note: expected ‘struct SSL_SESSION * (*)(struct ssl_st *, const unsigned char *, int,  int *)’ but argument is of type ‘struct SSL_SESSION * (*)(struct SSL *, u_char *, int,  int *)’
 void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
      ^
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/src/ngx_http_lua_module.o] 错误 1
make[1]: *** 正在等待未完成的任务....
make[1]:正在离开目录 `/usr/local/src/nginx-1.10.3'
make: *** [build] 错误 2

http://www.cnblogs.com/aoeiuv...
参考了这个文章,没有用,查了很多文章。

阅读 5.9k
1 个回答

lua-nginx-moduleOpenSSL 1.1.0不兼容
你换成OpenSSL 1.0.2就好了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题