Torch7 Lua,错误加载模块"libpaths"(Linux) [英] Torch7 Lua, error loading module 'libpaths' (Linux)
问题描述
我是TORCH LDT
的新用户.
我在加载模块"libpaths
"(在Ubuntu
上)时遇到问题. 错误日志为:
I am a new user to TORCH LDT
.
I have trouble loading module 'libpaths
' (on Ubuntu
). The error log is:
线程"main"中的异常com.naef.jnlua.LuaRuntimeException:错误 从文件加载模块"libpaths" '/usr/local/lib/lua/5.1/libpaths.so': /usr/local/lib/lua/5.1/libpaths.so:未定义符号:lua_gettop位于 com.naef.jnlua.LuaState.lua_pcall(本机方法)位于 com.naef.jnlua.LuaState.call(LuaState.java:555)在 org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLua51Launcher.run(JNLua51Launcher.java:128) 在 org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLua51DebugLauncher.main(JNLua51DebugLauncher.java:24)
Exception in thread "main" com.naef.jnlua.LuaRuntimeException: error loading module 'libpaths' from file '/usr/local/lib/lua/5.1/libpaths.so': /usr/local/lib/lua/5.1/libpaths.so: undefined symbol: lua_gettop at com.naef.jnlua.LuaState.lua_pcall(Native Method) at com.naef.jnlua.LuaState.call(LuaState.java:555) at org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLua51Launcher.run(JNLua51Launcher.java:128) at org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLua51DebugLauncher.main(JNLua51DebugLauncher.java:24)
可能是什么问题?预先感谢!
What might be the problem? Thanks in advance!
推荐答案
这是配置手电筒和日食的方法:
This is how to configure torch + eclipse:
1)使用手电筒配置Lua解释器:
转到Windows->首选项-> Lua->解释器:
Go to Windows -> Preference -> Lua -> interpreter:
-
解释器类型:Lua 5.2
Interpreter Type : Lua 5.2
解释器可执行文件:/opt/torch/install/bin/qlua(->这是 需要使用qt功能)
Interpreter executable : /opt/torch/install/bin/qlua (-> this is required to use qt features)
解释器名称:Qt + Torch解释器参数:-lenv -e "io.stdout:setvbuf('no');如果os.getenv('DEBUG_MODE')则要求 '调试器';需要'debugger.plugins.ffi'end"
Interpreter name : Qt + Torch Interpreter arguments : -lenv -e "io.stdout:setvbuf('no'); if os.getenv('DEBUG_MODE') then require 'debugger' ; require 'debugger.plugins.ffi'end"
LinkedExecution参数:Lua 5.2
LinkedExecution argument : Lua 5.2
2)选择此解释器作为默认解释器
2) Pick this interpreter as a default interpreter
3)还要使用外部解释器,要求安装"LuaSocket"数据包, 如果未安装,则会在调试时收到"libsocket.so not found"消息错误
3) Also Working with an external interpreter, require that "LuaSocket" packet is installed, You will get a message error of "libsocket.so not found" when debugging if it is not installed
要安装LuaSocket,您可以尝试:
sudo luarocks install luasocket --only-server=http://luarocks.org/repositories/rocks-scm
或
sudo luarocks install luasocket
或
luarocks install luasocket
这篇关于Torch7 Lua,错误加载模块"libpaths"(Linux)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!