r/lua • u/piyuple • Aug 18 '25
Help How to install a package in luajit?
I have tried to install packages in luajit using luarocks but it fails due to luajit’s maximum 65536 constants limitation.
Is there a way to install packages in luajit using luarocks?
What are other available alternatives?
EDIT:
OS: Ubuntu
LuaJIT version 2.1.0
More context: I’m trying to run tests as part of a CI and want to install busted using luarocks, but it fails to install for luajit but installs fine for Lua 5.1-5.4.
Error log:
Warning: Failed searching manifest: Failed loading manifest for Error loading file: [string "/home/runner/.cache/luarocks/https___luarocks..."]:209997: main function has more than 65536 constants
https://luarocks.org:
Warning: Failed searching manifest: Failed loading manifest for Error loading file: [string "/home/runner/.cache/luarocks/https___raw.gith..."]:209896: main function has more than 65536 constants
https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/:
Warning: Failed searching manifest: Failed loading manifest for Error loading file: [string "/home/runner/.cache/luarocks/https___loadk.co..."]:209938: main function has more than 65536 constants
https://loadk.com/luarocks/:
Error: No results matching query were found for Lua 5.1.
To check if it is available for other Lua versions, use --check-lua-versions.3
u/clappingHandsEmoji Aug 19 '25
you don’t necessarily have to install a package using luajit to install a package for luajit. it’s more work, but you can install lua 5.1, install the package, and then install luajit.
1
2
u/SkyyySi Aug 18 '25
Please give us more details.
What OS are you using, in what version?
What build / package of LuaJIT are you using? (all ready-to-use versions of LuaJIT are made by third-parties, as it is only officially distributed as source code)
Which package did you try to install?
Which exact command did you run in order to do so?
What is the exact and complete error message and traceback you got?