Torch7 Lua, error loading module 'libpaths'

2019-02-27 11:10发布

I am a new user to TORCH LDT. I have trouble loading module 'libpaths' (on Ubuntu). The error log is:

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!

标签: linux lua torch
1条回答
姐就是有狂的资本
2楼-- · 2019-02-27 11:43

This is how to configure torch + eclipse:

1) Configure the Lua interpreter with torch:

Go to Windows -> Preference -> Lua -> interpreter:

  • Interpreter Type : Lua 5.2

  • Interpreter executable : /opt/torch/install/bin/qlua (-> this is required to use qt features)

  • 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 argument : Lua 5.2

2) Pick this interpreter as a default interpreter

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

To install LuaSocket, you may try :

sudo luarocks install luasocket --only-server=http://luarocks.org/repositories/rocks-scm

or

sudo luarocks install luasocket

or

luarocks install luasocket

Credits to STRUB Floriab

查看更多
登录 后发表回答