【问题标题】:How do I change the installed version of Lua (Windows 10)如何更改已安装的 Lua 版本(Windows 10)
【发布时间】:2016-06-29 03:34:53
【问题描述】:

试图掌握 LuaDist。

按照https://github.com/LuaDist/Repository/wiki/LuaDist%3A-Installation 的说明进行操作,并通过使用以下方式构建新部署来测试安装:

cd _install\bin
luadist C:\my_lua install lua luasocket md5
cd C:\my_lua\bin
lua -e "require 'md5'"

但是我收到以下错误消息:

Finding out available versions of lua...
Getting lua-5.3.2 (source)...
Finding out available versions of luasocket...
Getting luasocket-3.0-rc1 (source)...
 - trying another candidate due to: Error getting dependency of 'luasocket-3.0-rc1': Package 'lua >=5.1,<5.3' needed, but selected at version '5.3.2'.
Getting luasocket-2.1-dev (source)...
 - trying another candidate due to: Error getting dependency of 'luasocket-2.1-dev': Package 'lua >=5.1,<5.3' needed, but selected at version '5.3.2'.
Getting luasocket-2.0.2 (source)...
 - trying another candidate due to: Error getting dependency of 'luasocket-2.0.2': Package 'lua ~>5.1' needed, but selected at version '5.3.2'.
Getting luasocket-scm (source)...
Cannot install package 'luasocket': Error getting dependency of 'luasocket-3.0-rc1': Package 'lua >=5.1,<5.3' needed, but selected at version '5.3.2'.

所以我搜索了一下,发现了这个页面:https://github.com/LuaDist/Repository/issues/221

这表示 lua 5.3.2 尚不支持,解决方法是使用 lua 5.2

所以,我非常乐观地盲目地运行了他建议的命令:

luadist.exe c:\lua52 install lua-5.2 luasec

它给了我以下信息:

C:\TDM-GCC-64\_bootstrap\_install\bin>luadist.exe c:\lua52 install lua-5.2
Finding out available versions of lua...
Getting lua-5.2 (source)...
Building lua-5.2...
Installation successful.

但是当我返回运行我的原始命令来测试部署(如上)时,我得到与上面相同的依赖错误。

我需要做什么才能让我的 LuaDist 从 5.3.2 切换到 5.2?

编辑:嗯,刚刚意识到我实际上错过了他的命令中的luasec。所以不知道我现在做了什么......

正确运行他的命令值得:

C:\TDM-GCC-64\_bootstrap\_install\bin>luadist.exe c:\lua52 install lua-5.2 luasec
Finding out available versions of luasec...
Getting luasec-0.4 (source)...
Finding out available versions of luasocket...
Getting luasocket-2.0.2 (source)...
 - trying another candidate due to: Error getting dependency of 'luasec-0.4': Error getting dependency of 'luasocket-2.0.2': Package 'lua ~>5.1' needed, but installed at version '5.2'.
Getting luasec-scm (source)...
Finding out available versions of luasocket...
Getting luasocket-2.0.2 (source)...
 - trying another candidate due to: Error getting dependency of 'luasocket-2.0.2': Package 'lua ~>5.1' needed, but installed at version '5.2'.
Getting luasocket-2.0.2 (source)...
Cannot install package 'luasec': Error getting dependency of 'luasec-0.4': Error getting dependency of 'luasocket-2.0.2': Package 'lua ~>5.1' needed, but installed at version '5.2'.

【问题讨论】:

    标签: lua


    【解决方案1】:

    Luadist 基于 Lua 5.1(某些模块可以使用 5.2 或 5.3).. 尝试使用 lua 5.1

    luadist.exe c:\lua51 安装 lua-5.1.5 luasec

    【讨论】:

    • 谢谢,试试这个
    猜你喜欢
    • 2020-01-22
    • 2023-03-16
    • 1970-01-01
    • 2020-08-06
    • 2018-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-10
    相关资源
    最近更新 更多