0

我下载了 Lua 和 Ravi 5.3 Debugger 插件并更改了 lanuch.json。我只是将 torch-activate 中的所有路径添加到其中。

{
"version": "0.2.0",
"configurations": [
    {
        "name": "Ravi Debugger",
        "type": "lua",
        "request": "launch",
        "program": "${workspaceRoot}/main.lua",
        "stopOnEntry": true,
        "cwd": "${workspaceRoot}",
        "LUA_PATH": "$/home/yan/.luarocks/share/lua/5.1/?.lua;/home/yan/.luarocks/share/lua/5.1/?/init.lua;/home/yan/torch/install/share/lua/5.1/?.lua;/home/yan/torch/install/share/lua/5.1/?/init.lua;./?.lua;/home/yan/torch/install/share/luajit-2.1.0-beta1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua",
        "LUA_CPATH": "/home/yan/torch/install/lib/?.so;/home/yan/.luarocks/lib/lua/5.1/?.so;/home/yan/torch/install/lib/lua/5.1/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so"
    }
]
}

然后错误发生在消息中:

Debugger initialized
Program terminated with error: error loading module 'libpaths' from file '/home/yan/torch/install/lib/lua/5.1/libpaths.so':
/home/yan/torch/install/lib/lua/5.1/libpaths.so: undefined symbol: lua_replace

我还没有谷歌正确的解决方案。提前致谢!

4

1 回答 1

0

看来您使用的是 lua 5.1。如果您查看 Lua ann Ravi 5.3 Debugger 的描述,您可以找到以下评论:

您可能无法调试 Lua 5.0、5.1 或 5.2 脚本 - 只有 5.3 经过测试并得到官方支持

于 2017-07-24T11:45:05.747 回答