鍍金池/ 問(wèn)答/Linux  網(wǎng)絡(luò)安全/ 正常運(yùn)行的nginx 添加lua-module報(bào)錯(cuò)

正常運(yùn)行的nginx 添加lua-module報(bào)錯(cuò)

nginx 編譯參數(shù):

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

這是正確的,在這個(gè)基礎(chǔ)上加上下面的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 就出錯(cuò)了。錯(cuò)誤如下:

/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] 錯(cuò)誤 1
make[1]: *** 正在等待未完成的任務(wù)....
make[1]:正在離開(kāi)目錄 `/usr/local/src/nginx-1.10.3'
make: *** [build] 錯(cuò)誤 2

http://www.cnblogs.com/aoeiuv...
參考了這個(gè)文章,沒(méi)有用,查了很多文章。

回答
編輯回答
孤星

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

2018年6月30日 02:41