当前系统基于Centos8版本,编译nginx,报错如下:
1 |
./configure: error: ngx_http_lua_module requires the Lua library. |
尝试安装lua依赖yum install lua-devel,但是问题依旧
我这里解决办法:
添加wlnmp源
1 |
rpm -ivh https://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm |
安装luaJIT2
1 |
yum install wluaJIT2 |
添加至/etc/profile
1 |
vi /etc/profile |
1 2 |
export LUAJIT_LIB=/usr/local/lib export LUAJIT_INC=/usr/local/include/luajit-2.1 |
保存退出,使其生效
1 |
source /etc/profile |
原文链接:nginx编译lua报错,提示缺少ngx_http_lua_module,转载请注明来源!