【问题标题】:Installation of luasocket using luarocks使用 luarocks 安装 luasocket
【发布时间】:2013-08-03 09:37:09
【问题描述】:

我按照

上的说明在我的 windows xp(32 位)系统中安装了 luarocks

http://luarocks.org/en/Installation_instructions_for_Windows

为了从 luarocks 安装 luasocket,我在命令提示符中使用了命令 "luarocks install luasocket"。但最终出现错误:

**Warning: Failed searching manifest: Failed loading manifest: Failed fetching man
ifest for http://luarocks.org/repositories/rocks - Error fetching file: Failed d
ownloading http://luarocks.org/repositories/rocks/manifest
Error: No results matching query were found.**

所以它无法找到 luasocket.rock 文件。我从链接下载了 luasocket-2.0.2-5.src.rock 文件:

http://luarocks.org/repositories/rocks/

现在我尝试使用命令 luarocks install luarocks install "C 安装这个 .rock 文件 :\Documents and Settings\Ankur_Gupta37\Desktop\LuaRocks\2.1\lua\luarocks"

(我把 luasocket-2.0.2-5.src.rock 放在位置 "C :\Documents and Settings\Ankur_Gupta37\Desktop\LuaRocks\2.1\lua\luarocks\luasocket-2.0.2-5.src.rock")

但又以错误告终:

**set INCLUDE=C:/Documents and Settings/Ankur_Gupta37/Desktop/LuaRocks/2.1/include
;%INCLUDE% &set LIB=C:/Documents and Settings/Ankur_Gupta37/Desktop/LuaRocks/2.1
;%LIB% &msbuild /p:"VCBuildAdditionalOptions= /useenv" luasocket.sln &mkdir mime
 & mkdir socket &cp src/mime.dll mime/core.dll &cp src/socket.dll socket/core.dl
l
'msbuild' is not recognized as an internal or external command,
operable program or batch file.
cp: cannot stat `src/mime.dll': No such file or directory
cp: cannot stat `src/socket.dll': No such file or directory
Error: Build error: Failed building.**

任何人告诉我问题及其解决方案..

【问题讨论】:

    标签: lua luasocket luarocks


    【解决方案1】:

    您可以尝试从 git 安装最新版本。 当前状态是 3.0 rc1。 此版本兼容 Lua 5.1/5.2 例如

    luarocks install https://raw.github.com/diegonehab/luasocket/master/luasocket-scm-0.rockspec
    

    luarocks install luasocket --only-server=http://luarocks.org/repositories/rocks-scm
    

    此 rockspec 可与 gcc (MinGW) 和 MSVC 一起使用。 如果你使用 MSVC,你应该运行 luarocks 表单 Visual Studio Command Prompt 如果您使用 MinGW,那么您应该将 mingw32-gcc 的路径添加到 %PATH% 环境变量中。

    【讨论】:

    • 当然你需要C编译器。您可以查看MinGW。它有 Windows 安装程序。
    • 有同样的问题,但在Linux上,这解决了它,感觉是由于版本。
    • 我只是使用 Visual Studio 命令提示符来完成此操作,但我必须以管理员权限打开它,然后导航回 Visual Studio 命令提示符文件夹 (...\Microsoft Visual Studio 1X. 0) 为了成功运行luarocks install luasocket 命令。
    猜你喜欢
    • 2018-11-08
    • 2012-12-29
    • 2017-10-23
    • 2021-08-11
    • 2018-08-10
    • 2017-05-10
    • 1970-01-01
    • 2015-12-25
    • 2014-02-14
    相关资源
    最近更新 更多