【问题标题】:Trouble installing luasocket/lfs using luarocks使用 luarocks 安装 luasocket/lfs 时遇到问题
【发布时间】:2017-10-23 14:36:11
【问题描述】:

我安装了 luarocks,现在我正在尝试使用它来安装 luasocket。

我的命令是

luarocks install luasocket-2.0.2-3.win32-x86.rock

我得到的回应是

C:\Program Files (x86)\LuaRocks\lua\luarocks\command_line.lua:186: bad argument #1 to 'require' (string expected, got table)

command_line.lua 中给麻烦的代码行是

if commands[command] then
    local cmd = require(commands[command])

在代码中添加跟踪写入表明commands[command] 确实是一个长度为零的表。

这种基本的运行时错误远远超出了 Lua 新手可以修复的任何东西。有什么建议吗?

编辑

原来它不仅仅是 luasocket。我遇到了同样的问题

luarocks install luafilesystem

【问题讨论】:

    标签: lua luarocks luafilesystem


    【解决方案1】:

    原来这是由我不知道的旧 LuaRocks 2.0.10 安装引起的。它是由于尝试安装 LuaDist-Batteries 失败而被放在那里的。

    这里的解决方案:https://github.com/luarocks/luarocks/issues/714

    【讨论】:

      猜你喜欢
      • 2013-08-03
      • 2018-11-08
      • 2012-12-29
      • 2021-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-16
      • 2015-01-14
      相关资源
      最近更新 更多