【问题标题】:How to configure vscode with torch7 on Ubuntu?如何在 Ubuntu 上使用 torch7 配置 vscode?
【发布时间】:2016-12-14 12:37:43
【问题描述】:

我下载了 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

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

【问题讨论】:

    标签: lua visual-studio-code torch vscode-settings


    【解决方案1】:

    看来您使用的是 lua 5.1。如果你查看 Lua ann Ravi 5.3 Debugger 的描述,你会发现这条评论:

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

    【讨论】:

    猜你喜欢
    • 2021-07-03
    • 2019-02-08
    • 2020-12-08
    • 2023-03-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-28
    • 1970-01-01
    相关资源
    最近更新 更多