Torch7 Lua,加载模块“libpaths"时出错(Linux) [英] Torch7 Lua, error loading module 'libpaths' (Linux)

查看:48
本文介绍了Torch7 Lua,加载模块“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 atcom.naef.jnlua.LuaState.lua_pcall(Native Method) 在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!

推荐答案

这是如何配置torch + eclipse:

This is how to configure torch + eclipse:

1) 使用 Torch 配置 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

感谢 STRUB Floriab

这篇关于Torch7 Lua,加载模块“libpaths"时出错(Linux)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆