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.
相关推荐
SabreWulf2020几秒前
Ubuntu 20.04手动安装.NET 8 SDK
linux·ubuntu·avalonia·.net8
不是吧这都有重名3 分钟前
为什么ubuntu大文件拷贝会先快后慢?
linux·运维·ubuntu
sunshine-sm25 分钟前
CentOS Steam 9安装 Redis
linux·运维·服务器·redis·centos
小熊h34 分钟前
MySQL集群高可用架构——组复制 (MGR)
linux·数据库·mysql
小雪_Snow1 小时前
CentOS 7 下载教程
centos
棒棒的唐1 小时前
armbian平台ubuntu环境下telnet安装及启动,给pantherX2增加一个应急通道
linux·运维·armbian·telnetd
bug攻城狮1 小时前
CentOS 7 设置静态 IP 地址
linux·tcp/ip·centos
纳切威1 小时前
CentOS 7部署Zabbix5.0
linux·运维·centos·zabbix
sunshine-sm2 小时前
CentOS Steam 9安装 MySQL 8
linux·运维·服务器·数据库·mysql·centos·centos stream
bug攻城狮2 小时前
CentOS 7 快速检查软件包是否已安装的5种方法
linux·运维·centos