Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngx_http_lua_module 0.10.27 #2354

Open
yangyepope opened this issue Aug 30, 2024 · 12 comments
Open

ngx_http_lua_module 0.10.27 #2354

yangyepope opened this issue Aug 30, 2024 · 12 comments

Comments

@yangyepope
Copy link

I have already upgraded the ngx_http_lua_module to version 0.10.27, but I am still encountering the error during startup ;failed to load the 'resty.core' module (https://github.com/openresty/lua-resty-core); ensure you are using an OpenResty release from https://openresty.org/en/download.html (reason: /opt/nginx/lualib/resty/core/base.lua:24: ngx_http_lua_module 0.10.27 required)

@yangyepope
Copy link
Author

image

@yangyepope
Copy link
Author

My installation environment is Debian 11.

@yangyepope
Copy link
Author

Initially, I used apt for installation and encountered this issue. Later, I manually installed OpenResty 1.25.3.2 from the distribution, but the problem persists.

@zhuizhuhaomeng
Copy link
Contributor

lua-nginx-module is not a Lua module
You need to compile the lua-nginx-module in the openresty bundle.
That is to say you need a new version of nginx.

@yangyepope
Copy link
Author

openresty不是已经自带nginx吗,我需要怎么做

@yangyepope
Copy link
Author

我的服务器上安装了单独的nginx但是没有使用,应该是不影响的吧

@yangyepope
Copy link
Author

我在编译的时候直接使用的./configure ,是不是需要./configure --prefix=/usr/local/openresty --with-luajit
才行

@lynch1981
Copy link
Contributor

You can try the following steps

  1. Download openresty source code
  2. Upgrade openresty-1.25.3.2/bundle/ngx_lua-0.10.26 to ngx_lua-0.10.27
  3. In the openresty-1.25.3.2/directory, execute configure and recompile

@yangyepope
Copy link
Author

Do I need to download and extract lua-nginx-module-0.10.27.tar.gz, and then rename it to lua-nginx-0.10.27

@yangyepope
Copy link
Author

Or where to get the ngx_lua-0.10.27 package from?

@yangyepope
Copy link
Author

Here is the result of the configure command:
OK Successfully built LuaJIT
gmake[1]: Leaving directory '/root/openresty-1.25.3.2/build/LuaJIT-2.1-20231117.1/src'
==== Successfully built LuaJIT 2.1 ====
gmake install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=/root/openresty-1.25.3.2/build/luajit-root/
==== Installing LuaJIT 2.1.ROLLING to /usr/local/openresty/luajit ====
mkdir -p /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/bin /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/include/luajit-2.1 /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/share/man/man1 /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/pkgconfig /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/share/luajit-2.1/jit /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/share/lua/5.1 /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/lua/5.1
cd src && install -m 0755 luajit /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/bin/luajit-2.1.ROLLING
cd src && test -f libluajit.a && install -m 0644 libluajit.a /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/libluajit-5.1.a || :
rm -f /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/libluajit-5.1.so.2.1.ROLLING /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/libluajit-5.1.so /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/libluajit-5.1.so.2
cd src && test -f libluajit.so &&
install -m 0755 libluajit.so /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/libluajit-5.1.so.2.1.ROLLING &&
( ldconfig -n 2>/dev/null /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib || : ) &&
ln -sf libluajit-5.1.so.2.1.ROLLING /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/libluajit-5.1.so &&
ln -sf libluajit-5.1.so.2.1.ROLLING /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/libluajit-5.1.so.2 || :
cd etc && install -m 0644 luajit.1 /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/share/man/man1
cd etc && sed -e "s|^prefix=.|prefix=/usr/local/openresty/luajit|" -e "s|^multilib=.|multilib=lib|" -e "s|^relver=.*|relver=ROLLING|" luajit.pc > luajit.pc.tmp &&
install -m 0644 luajit.pc.tmp /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/lib/pkgconfig/luajit.pc &&
rm -f luajit.pc.tmp
cd src && install -m 0644 lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/include/luajit-2.1
cd src/jit && install -m 0644 bc.lua bcsave.lua dump.lua p.lua v.lua zone.lua dis_x86.lua dis_x64.lua dis_arm.lua dis_arm64.lua dis_arm64be.lua dis_ppc.lua dis_mips.lua dis_mipsel.lua dis_mips64.lua dis_mips64el.lua dis_mips64r6.lua dis_mips64r6el.lua vmdef.lua /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/share/luajit-2.1/jit
ln -sf luajit-2.1.ROLLING /root/openresty-1.25.3.2/build/luajit-root//usr/local/openresty/luajit/bin/luajit
==== Successfully installed LuaJIT 2.1.ROLLING to /usr/local/openresty/luajit ====
export LUAJIT_LIB='/root/openresty-1.25.3.2/build/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='/root/openresty-1.25.3.2/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1'
cd ..
No source directory found for ngx_lua

should i pay attention to the message: "No source directory found for ngx_lua" message

@yangyepope
Copy link
Author

No source directory found for ngx_lua
root@VM-0-16-debian:/openresty-1.25.3.2# make -j2
make: *** No targets specified and no makefile found. Stop.
root@VM-0-16-debian:
/openresty-1.25.3.2# sudo make install
make: *** No rule to make target 'install'. Stop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants