I am running ubuntu and installed luarocks,
however, whenever I try to install a something like luasocket (luarocks install luasocket), it throws me the following error:
Error: Failed finding Lua library. You may need to configure LUA_LIBDIR
Both my config files look like this:
rocks_trees = {
{ name = "user", root = home .. "/.luarocks" };
{ name = "system", root = "/usr/local" };
}
lua_interpreter = "lua5.3";
variables = {
LUA_DIR = "/usr/include/lua53";
LUA_BINDIR = "/usr/bin/lua53";
}
Any help is appreciated!
You need to add LUA_LIBDIR
to the variable it should look something like this:
rocks_trees = { "/usr/local/lib/luarocks/5.1" }
variables = {
LUA = "/usr/local/opt/lua/bin/lua5.1",
LUA_BINDIR = "/usr/local/opt/lua/bin",
LUA_INCDIR = "/usr/local/opt/lua/include",
LUA_LIBDIR = "/usr/local/opt/lua/lib",
}
Resources for config file:
http://lua-users.org/wiki/LuaRocksConfig
https://github.com/luarocks/luarocks/wiki/Config-file-format
thanks for the responses, however i got it working by:
uninstalling lua
uninstalling luarocks
installing lua5.1 as well as the development version
installing luarocks as instructed on luarocks.org
the problem for me was i somehow got lua5.3 as my main lua version, but somehow had other version source files, so i just had to completely delete everything and make sure i download consistent versions.
Hope this helps anyone else!