nginx编译lua报错,提示缺少ngx_http_lua_module

来自:吴昊博客
时间:2022-03-01
阅读:

当前系统基于Centos8版本,编译Nginx,报错如下:

./configure: error: ngx_http_lua_module requires the Lua library.

尝试安装lua依赖yum install lua-devel,但是问题依旧

我这里解决办法:

添加wlnmp源

rpm -ivh https://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm

安装luaJIT2

yum install wluaJIT2

添加至/etc/profile

vi /etc/profile
export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.1

保存退出,使其生效

source /etc/profile
返回顶部
顶部