Search code examples
ubuntulualuarocks

Error: Failed finding Lua library. You may need to configure LUA_LIBDIR


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!


Solution

  • 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!