I am working on Debian Stable Linux. I installed luafilesystem module by command:
luarocks --local install luafilesystem
However, it is not found when any of following is used in lua source files:
require ("lfs")
require ("luafilesystem")
(Although these files run properly when ran from within ZeroBraneStudio IDE).
From a suggestion on the web, I ran following command also:
luarocks --local install luarocks
But it does not help. I checked with luarocks-admin command, which showed:
CONFIGURATION
Lua version: 5.1
Configuration files:
System: /etc/luarocks/config.lua (ok)
User : /home/abcd/.luarocks/config-5.1.lua (not found)
Rocks trees in use:
/home/abcd/.luarocks
/usr/local
Currently, I only have these 2 modules installed:
$ luarocks list
Installed rocks:
----------------
luafilesystem
1.7.0-2 (installed) - /home/abcd/.luarocks/lib/luarocks/rocks
luarocks
2.4.3-1 (installed) - /home/abcd/.luarocks/lib/luarocks/rocks
Should I copy /etc/luarocks/config.lua to /home/abcd/.luarocks for this? Thanks for your help.
require "luarocks.loader"
first? – Grenvillesudo luarocks install luafilesystem
(without --local option) and it works. So luarocks.loader is needed for locally installed modules? – Vat