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 天前
虚拟机VMware Workstation Pro 25H2设置中文界面
运维
爱潜水的小L1 天前
自学嵌入式day30,回收进程
java·linux·服务器
水天需0101 天前
PS 例程大全
linux
源宇宙十三站1 天前
Linux故障诊断系列2.3-诊断系统启动问题-Server启动失败该如何处理
linux
liebe1*11 天前
第九章 防火墙入侵防御
运维·网络·防火墙
橘子真甜~1 天前
C/C++ Linux网络编程13 - 传输层TCP协议详解(面向字节流和有连接)
linux·运维·服务器·c语言·网络·c++·tcp/ip
嘻哈baby1 天前
systemd服务管理深入实践从入门到自定义服务
linux·服务器·网络
qq_5470261791 天前
Docker 搭建Nexus3私服
运维·docker·容器
June`1 天前
SSH连接原理与守护进程实战
linux·运维·服务器
水天需0101 天前
Grep 例程大全
linux