我按照以下说明在Windows XP(32位)系统中安装了羽绒被
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/
现在,我尝试使用命令安装该.rock文件。luarocks install luarocks install“C
:\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.**
任何人都可以告诉我这个问题及其解决方案。
最佳答案
您可以尝试从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 Command Prompt
的形式运行luarocks如果使用MinGW,则应将
mingw32-gcc
的路径添加到%PATH%环境变量中。