Open dlannan-fmad opened 4 years ago
I think it must be related to our platform. We are using tiny core linux, with many customizations. Going to check environment variables and paths. Im still not quite understanding why the package search path is looking in '/usr/local/share/luajit-2.1.0-beta3/resty/core.lua' when the recommended luajit is 2-2.1 ? Could this be an issue?
After many attempts, it doesnt appear that the installation procedure for nginx works. There is always a dependency to load resty.core when exectued. We do not want to use openresty - can someone confirm if this module works as a standalone nginx module or not?
I should also note, all the tests pass fine during the build process. So this seems a little odd.
Ok. More investigation into this build process, and it looks like there is a dependency on the lua resty core repo: https://github.com/openresty/lua-resty-core Which means the install documents will not allow building of the module with the installation of the above repo.
Quick question: Is there a bundle that can be used with the nginx module? Rather than a bunch of lua script spread across various directories?
I have found a solution, and it seems to work (obviously resty.core features will not work). Comment out lines 3996-4002 here: https://github.com/openresty/lua-nginx-module/blob/7105adaa523adedec80f0aaa13388b88d08988f8/src/ngx_http_lua_util.c#L3996-L4002 And comment out: https://github.com/openresty/lua-nginx-module/blob/7105adaa523adedec80f0aaa13388b88d08988f8/src/ngx_http_lua_util.c#L3924
This will allow you to build this module without the need of installing the full openresty system.
Amazing how many people have this problem. I believe the solution is simple - you need update your nginx.conf to include the lua package path as follows
lua_package_path "/usr/local/lib/lua/?.lua;;";
Amazing how many people have this problem. I believe the solution is simple - you need update your nginx.conf to include the lua package path as follows
lua_package_path "/usr/local/lib/lua/?.lua;;";
This wont help with building without resty.core. Which is what is mentioned in the comment - no openresty, just the lua module.
@dlannan sorry I did not read the thread. Thank you for your correction.
I am a little confused if you wish to avoid OPENRESTY or avoid RESTY CORE the reason I ask is because I don't use openresty rather I just download resty-core eg. sudo wget https://github.com/openresty/lua-resty-core/archive/v${LUA_RESTY_CORE}.tar.gz
this is significantly less than having to build the full openresty
note I did find I need to now download lua-resty-lrucache as well to get it all working.
so in summary in my build I use the following and it works fine
No probs. Our use case is a little erm.. specific :) There are a couple of modules, and I have developed some addon modules for doing quite bespoke interactions with lua all embedded into static libs (hence the need to hand build most of this). We dont run any shared libs.
github checkout of lua-nginx-modile nginix version 1.19.0 openresty luajit2-2.1-20201027
I followed the instructions to install with nginx and I get this:
The error states to use the openresty luajit - but it is. I followed the instructions to do so. And there is no other luajit installed on the system. I have tried various different tweaks, but I cannot seem to get this to work. It looks like resty.core is required to use this module in nginx. Is that the case? I do not wish to add openresty (its far too big for our implementation - we cant afford large changes in files and structure). If openresty is now required I'll add my own luajit module.
Any help would be greatly appreciated.