T
Termux3w ago
Gptman

Luarocks issue

Hi, I'm having an issue with rocks.nvim in Termux. When I try to sync or install plugins (like rocks-git.nvim), I get this error:
[START][2025-11-07 15:30:13] rocks.nvim logging initiated
WARN | 2025-11-07 15:30:13.678 | .../.local/share/nvim/rocks/rocks_rtp/lua/rocks/runtime.lua:46 | Rock rocks-git.nvim does not appear to be installed.
ERROR | 2025-11-07 15:30:24.171 | ....local/share/nvim/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2025-11-07 15:30:24.171 | ....local/share/nvim/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | ln: failed to create hard link '/data/data/com.termux/files/home/.local/share/nvim/rocks/lockfile.lfs' => '/data/data/com.termux/files/home/.local/share/nvim/rocks/.lock.tmp.71836202': Permission denied

Error: command 'install' requires exclusive write access to /data/data/com.termux/files/home/.local/share/nvim/rocks - failed to force the lock: File exists

ERROR | 2025-11-07 15:30:24.171 | ...im/rocks/rocks_rtp/lua/rocks/operations/helpers/init.lua:138 | Failed to install rocks-git.nvim
ERROR | 2025-11-07 15:30:24.171 | ...share/nvim/rocks/rocks_rtp/lua/rocks/operations/sync.lua:48 | SYNC ERROR: Failed to install rocks-git.nvim.
WARN | 2025-11-07 15:30:24.558 | .../.local/share/nvim/rocks/rocks_rtp/lua/rocks/runtime.lua:46 | Rock rocks-git.nvim does not appear to be installed.
ERROR | 2025-11-07 15:30:29.468 | ...share/nvim/rocks/rocks_rtp/lua/rocks/operations/sync.lua:281 | Sync completed with errors! Run ':Rocks log' for details.
[START][2025-11-07 15:30:13] rocks.nvim logging initiated
WARN | 2025-11-07 15:30:13.678 | .../.local/share/nvim/rocks/rocks_rtp/lua/rocks/runtime.lua:46 | Rock rocks-git.nvim does not appear to be installed.
ERROR | 2025-11-07 15:30:24.171 | ....local/share/nvim/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2025-11-07 15:30:24.171 | ....local/share/nvim/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | ln: failed to create hard link '/data/data/com.termux/files/home/.local/share/nvim/rocks/lockfile.lfs' => '/data/data/com.termux/files/home/.local/share/nvim/rocks/.lock.tmp.71836202': Permission denied

Error: command 'install' requires exclusive write access to /data/data/com.termux/files/home/.local/share/nvim/rocks - failed to force the lock: File exists

ERROR | 2025-11-07 15:30:24.171 | ...im/rocks/rocks_rtp/lua/rocks/operations/helpers/init.lua:138 | Failed to install rocks-git.nvim
ERROR | 2025-11-07 15:30:24.171 | ...share/nvim/rocks/rocks_rtp/lua/rocks/operations/sync.lua:48 | SYNC ERROR: Failed to install rocks-git.nvim.
WARN | 2025-11-07 15:30:24.558 | .../.local/share/nvim/rocks/rocks_rtp/lua/rocks/runtime.lua:46 | Rock rocks-git.nvim does not appear to be installed.
ERROR | 2025-11-07 15:30:29.468 | ...share/nvim/rocks/rocks_rtp/lua/rocks/operations/sync.lua:281 | Sync completed with errors! Run ':Rocks log' for details.
I think this started after a recent update in Termux that changed Luarocks from Lua 5.1 to Lua 5.4
1 Reply
owokitty
owokitty3w ago
@Maverick Hunter I don't know how to completely fix that without reverting the PR, but I have collected information and forwarded this to the creator of the PR which changed the Lua version of luarocks to 5.4. https://github.com/termux/termux-packages/pull/26914#issuecomment-3507655477 Maybe they know how to fix that without reverting the PR.
GitHub
luarocks: build with lua54 by Ra2-IFV · Pull Request #26914 · ter...
CI won't pass because current docker image doesn't have lua5.4 Also includes a small fix for linting on different branches, triggered by whatever

Did you find this page helpful?