1
    ZeroBrain Studio (ZBS): error loading module 'rds.parser' from file '/opt/zbstudio/bin/linux/x64/clibs53/rds/parser.so':
        /opt/zbstudio/bin/linux/x64/clibs53/rds/parser.so: undefined symbol: luaL_register
    stack traceback:
        [C]: in ?
        [C]: in function 'require'
        lua/system/pgsql.lua:11: in main chunk

我需要将我从某个外部资源https://github.com/openresty/lua-rds-parser获得的外部 C++ 模块添加到我的 ZeroBrane Studio 项目中

我在 ubuntu 19.04 上使用 lua 5.3 和 ZeroBrane Studio。

我编译了lua-rds-parser上面提到的库并收到了 parser.so ,只需通过 sudo make- 命令启动到解压缩的目录。我从那里复制parser.so到目录,当启动我写的 my - 文件时, Studio 尝试找到它:/opt/zbstudio/bin/linux/x64/clibs53/rds/parser.soZeroBranehello.lua

    local parser = require("rds.parser")

按照http://webserver2.tecgraf.pucrio.br/~lhf/ftp/lua/install.html中的描述完成。

但是错误信息如下: undefined symbol: luaL_register

4

1 回答 1

1

正如评论中已经指出的那样,您可能已经rds.parser针对 Lua 5.1 库(提供luaL_register)进行了编译,但正试图将其加载到不提供此功能的 Lua 5.3 中,因为它已被弃用。您需要针对 Lua 5.3 重新编译rds.parser,以便它可以由 Lua 5.3 解释器加载。

于 2019-08-18T04:50:40.127 回答