【问题标题】:Luarocks stop working after updating from 2.0.2 to 2.2.0 for windowsLuarocks 从 Windows 的 2.0.2 更新到 2.2.0 后停止工作
【发布时间】:2014-11-19 02:23:37
【问题描述】:

我使用 LuaForWindows 安装 LuaRocks 2.0.2 附带的 lua,当我在命令行中键入 luarocks install luarocks 时它会安装最新的 2.2.0 luarocks 但是当我尝试使用 luarocks 安装其他 Rocks 时它会回来有错误

Site-local luarocks/site_config.lua file not found. Incomplete installation?
'uname' is not recognized as an internal or external command,
operable program or batch file.
'uname' is not recognized as an internal or external command,
operable program or batch file.
C:/Program Files (x86)/Lua/5.1/lua: C:\Program Files (x86)\Lua\5.1\lua/luarocks\
cfg.lua:80: attempt to index local 'proc' (a nil value)
stack traceback:
        C:\Program Files (x86)\Lua\5.1\lua/luarocks\cfg.lua:80: in main chunk
        [C]: in function 'require'
        ...\Program Files (x86)\Lua\5.1\lua/luarocks\loader.lua:17: in main chun
k
        [C]: ?
        [C]: ?

我是否缺少任何额外的步骤来使它工作 谢谢

【问题讨论】:

    标签: lua luarocks


    【解决方案1】:

    luarocks install luarocks 仅从 2.1.0 开始受支持(并且主要在 Unix 上测试)。

    要在 Windows 上从旧版本升级,请使用supplied .zip file for Windows from the LuaRocks website

    【讨论】:

    • 我仍然得到一个错误:当我调用 luarocks 时,错误的参数 #1 到 'require'(需要字符串,得到表)。这是我的步骤。首先,我安装了 luaforwindows,然后在命令行中下载了 2.2.0 win32 zip 文件,然后运行 ​​Install /L /P ,然后复制了 luarocks 文件夹并将其粘贴到 luarocks 文件夹 ./lua/5.1/lua 中是,我将安装生成的配置复制到 ./lua/5.1。你认为我做错了什么,或者有其他方法可以做到这一点
    • Hisham 我能够升级 luarocks,我安装了 luaforwindows 而没有使用 rock,我确实使用了 zip 文件并复制了 luarocks 文件夹,而且我确实将其他 luarocks_... 文件复制到了 ./lua/5.1文件夹
    • 很高兴知道您找到了方法!如果您对在 Windows 上运行 LuaRocks 有任何疑问,获得帮助的最佳方式是 luarocks-developers 邮件列表!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-03
    • 1970-01-01
    • 1970-01-01
    • 2013-08-29
    • 1970-01-01
    相关资源
    最近更新 更多