老师 我在添加lua模块的时候出现这个报错:
incompatible types when assigning to type ‘struct ngx_buf_t *’ from type ‘ngx_chain_t’
我是基于 nginx1.6.1编译的,然后通过 :
--add-module=/usr/local/src/ngx_devel_kit-0.3.0 --add-module=/usr/local/src/lua-nginx-module-0.10.8
来添加lua模块 但是出现报错:
/usr/local/src/lua-nginx-module-0.10.8/src/ngx_http_lua_headers.c:151:15: error: incompatible types when assigning to type ‘struct ngx_buf_t *’ from type ‘ngx_chain_t’
b = hc->busy[i];
^
/usr/local/src/lua-nginx-module-0.10.8/src/ngx_http_lua_headers.c:227:15: error: incompatible types when assigning to type ‘struct ngx_buf_t *’ from type ‘ngx_chain_t’
b = hc->busy[i];
^
make[1]: *** [objs/addon/src/ngx_http_lua_headers.o] Error 1
make[1]: Leaving directory `/usr/local/src/nginx-1.16.1'
make: *** [build] Error 2
老师这个怎么去解决呢,求解,谢谢拉
展开
作者回复: openresty的lua模块手动添加非常容易出错,openresty的官网都不推荐手动添加。如果你想用lua,建议直接下载它的官网上打包好的openresty,在那个基础上用with或者without来增删模块更方便。