You are not logged in.
This post was prepared with the assistance of AI for translation and formatting.
Problem Description
After the recent update that split the
luarockspackage into multiple packages (2026-03-24), the
luarockscommand is no longer functional when installed alone. It fails with:
/usr/bin/lua5.5: /usr/sbin/luarocks:7: module 'luarocks.core.cfg' not foundAdditionally, post-installation hooks fail when installing other packages that trigger manifest generation.
Steps to Reproduce
In a clean Arch Linux environment (container or VM):
# 1. Install only luarocks
pacman -S luarocks
# 2. Try to use it
luarocks --helpExpected:
luarocks command works
Actual: Module not found error
# 3. Install any Lua package that triggers the hook
pacman -S lua54-zlibExpected: Hook completes successfully
Actual: Hook fails with same module not found error
Analysis
After investigating, I found that:
The
luarockspackage is now split:
luarocks(6 KB) – command-line tools and hooks
lua-luarocks– actual Lua 5.5 library files
lua54-luarocks,
lua53-luarocks, etc. – for other Lua versions
The
luarockspackage does NOT automatically install
lua-luarocks:
$ pacman -Qi luarocks | grep Depends
Depends On : coreutils curl lua unzip zipWithout
lua-luarocks, the necessary files are missing:
$# ls /usr/share/lua/5.5/luarocks/core/
ls: cannot access '/usr/share/lua/5.5/luarocks/core/': No such file or directoryThe post-installation hooks require these files:
$ cat /usr/share/libalpm/hooks/luarocks-make-manifest-5.5.hook
[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/luarocks/rocks-5.5/*/**
[Action]
Description = Generating luarocks manifest for Lua 5.5...
When = PostTransaction
Exec = /usr/bin/luarocks-admin make_manifest --local-tree --lua-version=5.5 /usr/lib/luarocks/rocks-5.5/
Depends = luarocksThis hook fails because
luarocks-adminrequires
luarocks.core.cfgfrom
lua-luarocks.
Workaround
pacman -S lua-luarocksAfter installing
lua-luarocks, everything works as expected.
Root Cause
Looking at the PKGBUILD in the Git repository (commit from 2026-03-24), I found the issue:
package_luarocks() {
depends+=(lua-luarocks) # - attempts to add dependency
depends=(coreutils # - overwrites the array!
curl
lua
unzip
zip)
# ...
}The
dependsarray is overwritten immediately after appending
lua-luarocks, causing the dependency to be lost.
Correct version should be:
package_luarocks() {
depends=(coreutils
curl
lua
unzip
zip
lua-luarocks) # Add dependency here
# or:
# depends=(coreutils ...)
# depends+=(lua-luarocks) # Append after setting
}Impact
New installations of
luarocksare non-functional
Post-installation hooks fail for any package that triggers them
Automated scripts and containers that install
luarockswill break
User experience: package appears broken immediately after installation
Suggested Fix
Update the PKGBUILD to correctly include
lua-luarocksin the
dependsarray for the
luarockspackage.
Additional Information
Package version: luarocks 3.13.0-4
Split introduced: 2026-03-24 (Build Date)
Maintainers: Daurnimator, Caleb Maclennan
Package size discrepancy: luarocks (6.7 KB installed) vs lua-luarocks (multiple MB, contains actual Lua modules)
Verification
After installing
lua-luarocks:
$ luarocks --version
/usr/bin/luarocks 3.13.0
LuaRocks main command-line interface
$ luarocks list
Rocks installed for Lua 5.5
---------------------------
(no rocks installed)All hooks also complete successfully.
Given that:
The
luarocksbinary uses Lua 5.5 (
#!/usr/bin/lua5.5)
It requires the library files from
lua-luarocksto function
I believe this is a bug that should be fixed by adding the missing dependency.
Related Links
Package page: https://archlinux.org/packages/extra/any/luarocks/
Git repository: https://gitlab.archlinux.org/archlinux/ … s/luarocks
Commit that introduced split: 2026-03-24
Offline
This post was prepared with the assistance of AI for translation and formatting.
Next time make chatgpt search the forum first, https://bbs.archlinux.org/viewtopic.php?id=312844
Offline
This post was prepared with the assistance of AI for translation and formatting.
Next time make chatgpt search the forum first, https://bbs.archlinux.org/viewtopic.php?id=312844
Sorry, I ran into this issue while updating and checked "Pacman & Package Upgrade Issues" first—didn't see any related post there (should've searched the whole forum). Good to see it's already been identified and will be fixed soon. Appreciate the quick work! ?
Offline