CentOS 7.9安装Nginx1.24.0时报 checking for LuaJIT 2.x ... not found

Nginx1.24编译时,报LuaJIT2.x错误,

bash 复制代码
configuring additional modules
adding module in /www/server/nginx/src/ngx_devel_kit
 + ngx_devel_kit was configured
adding module in /www/server/nginx/src/lua_nginx_module
checking for LuaJIT 2.x ... not found
    ./configure: error: unsupported LuaJIT version; ngx_http_lua_module requires LuaJIT 2.x.

1.首先确认系统中是否存在,使用命令:luajit -v

bash 复制代码
# luajit -v
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2022 Mike Pall. https://luajit.org/

2.如果存在 ,一般在 /usr/local/include 目录下

bash 复制代码
# ll /usr/local/include/luajit-2.1/
total 44
-rw-r--r-- 1 root root  6028 Jun  7 20:50 lauxlib.h
-rw-r--r-- 1 root root  4593 Jun  7 20:50 luaconf.h
-rw-r--r-- 1 root root 12650 Jun  7 20:50 lua.h
-rw-r--r-- 1 root root   135 Jun  7 20:50 lua.hpp
-rw-r--r-- 1 root root  3019 Jun  7 20:50 luajit.h
-rw-r--r-- 1 root root  1197 Jun  7 20:50 lualib.h

3.输入以下命令

bash 复制代码
export LUAJIT_INC=/usr/local/include/luajit-2.1/
export LUAJIT_LIB=/usr/local/lib

4.重新运行 ./configure 命令

5.以下错误是【./configure: error: unsupported LuaJIT build; ngx_http_lua_module requires LuaJIT with FFI enabled.】是因为没输入【export LUAJIT_LIB=/usr/local/lib】

bash 复制代码
configuring additional modules
adding module in /www/server/nginx/src/ngx_devel_kit
 + ngx_devel_kit was configured
adding module in /www/server/nginx/src/lua_nginx_module
checking for LuaJIT library in  and /usr/local/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl) ... found
checking for LuaJIT 2.x ... found
checking for Lua language 5.1 ... found
checking for LuaJIT has FFI ... not found
    ./configure: error: unsupported LuaJIT build; ngx_http_lua_module requires LuaJIT with FFI enabled.
相关推荐
甲鱼9291 小时前
MySQL 实战手记:日志管理与主从复制搭建全指南
运维
Johny_Zhao15 小时前
OpenClaw安装部署教程
linux·人工智能·ai·云计算·系统运维·openclaw
chlk1232 天前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统
舒一笑2 天前
Ubuntu系统安装CodeX出现问题
linux·后端
改一下配置文件2 天前
Ubuntu24.04安装NVIDIA驱动完整指南(含Secure Boot解决方案)
linux
碳基沙盒2 天前
OpenClaw 多 Agent 配置实战指南
运维
xy123062 天前
OpenStack Train 部署实战(三)控制节点--keystone服务
centos·openstack
深紫色的三北六号3 天前
Linux 服务器磁盘扩容与目录迁移:rsync + bind mount 实现服务无感迁移(无需修改配置)
linux·扩容·服务迁移
SudosuBash3 天前
[CS:APP 3e] 关于对 第 12 章 读/写者的一点思考和题解 (作业 12.19,12.20,12.21)
linux·并发·操作系统(os)
哈基咪怎么可能是AI3 天前
为什么我就想要「线性历史 + Signed Commits」GitHub 却把我当猴耍 🤬🎙️
linux·github