我正在运行 ubuntu 并安装了 luarocks,
但是,每当我尝试安装类似 luasocket 的东西(luarocks install luasocket)时,它都会抛出以下错误:
Error: Failed finding Lua library. You may need to configure LUA_LIBDIR
我的两个配置文件都如下所示:
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";
}
任何帮助表示赞赏!
最佳答案
您需要添加LUA_LIBDIR
对于变量,它应该看起来像这样:
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",
}
配置文件的资源:
http://lua-users.org/wiki/LuaRocksConfig
https://github.com/luarocks/luarocks/wiki/Config-file-format
关于ubuntu - 错误 : Failed finding Lua library. 您可能需要配置 LUA_LIBDIR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54813206/