有云锁用户求助到博主iMin:在编译云锁NGINX防护模块时,在configure时报错,报错代码如下:

./configure: error: unsupported LuaJIT version; ngx_http_lua_module requires LuaJIT 2.x.

经过博主(iMin)远程查看,是由于缺少LuaJIT模块导致的,目前常见于较高版本的系统或1.23以上的NGINX版本存在此问题,解决方法如下:

1、先查看是否已安装lua-devel,直接执行安装即可

yum install lua-devel

2、添加wlnmp源


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

3、安装LuaJIT2.X

yum install wluaJIT2

4、添加至/etc/profile

vi /etc/profile

添加如下两行到这个文件中

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

5、保存并使其生效

source /etc/profile

完成以上步骤后,重新configure并按编译教程正常编译,即可顺利开启云锁防护。