使用luarocks安装luasocket

我按照http://luarocks.org/en/Installation_instructions_for_Windows上的说明在我的Windows XP(32位)系统上安装了Luarocks,为了安装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 **:\Documents and Settings\Ankur_Gupta37\Desktop\LuaRocks\2.1\lua\luarocks"**安装此.rock文件

(我将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.**

有人能告诉我问题及其解决方案吗?

点赞
用户2328287
用户2328287

您可以尝试从 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,则应在“Visual Studio 命令提示符”中运行 luarocks。 如果您使用 MinGW,则应将 mingw32-gcc 的路径添加到 %PATH% 环境变量中。

2013-08-02 08:24:47