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.
相关推荐
倔强的石头_1 小时前
【Linux指南】动静态库与链接机制:从原理到实践
linux
赏点剩饭7781 小时前
linux中的hostpath卷、nfs卷以及静态持久卷的区别
linux·运维·服务器
神鸟云1 小时前
DELL服务器 R系列 IPMI的配置
linux·运维·服务器·网络·边缘计算·pcdn
herderl2 小时前
**僵尸进程(Zombie Process)** 和**孤儿进程(Orphan Process)**
linux·运维·服务器·网络·网络协议
lepton_yang2 小时前
Zephyr下控制ESP32S3的GPIO口
linux·嵌入式硬件·esp32·zephyr
泽02022 小时前
Linux 编译器 gcc 与 g++
linux·运维·服务器
G_H_S_3_3 小时前
【网络运维】Playbook项目实战:基于 Ansible Playbook 一键部署 LNMP 架构服务器
linux·运维·服务器·网络·ansible
yuxb733 小时前
Ansible 学习笔记:变量事实管理、任务控制与文件部署
linux·运维·笔记
岚天start4 小时前
Linux sar命令详细使用指南
linux·运维·服务器·负载·sar·磁盘io·sysstat