首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >nginx 添加lua-module报错?

nginx 添加lua-module报错?

提问于 2017-11-22 11:51:36
回答 1关注 0查看 1.6K

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

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档