2013-08-02 16 views
6

Tôi đã cài đặt luarocks trong cửa sổ xp của tôi hệ thống (32 bit) theo hướng dẫn có sẵn trênLắp đặt luarocks luasocket sử dụng

http://luarocks.org/en/Installation_instructions_for_Windows

để cài đặt luasocket từ luarocks tôi đã sử dụng lệnh "luarocks cài đặt luasocket" trong lệnh lời nhắc. nhưng đã kết thúc với lỗi:

**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.** 

để không thể tìm ra tệp luasocket.rock. Tôi đã tải về tập tin luasocket-2.0.2-5.src.rock từ liên kết:

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

Bây giờ tôi đã cố gắng để cài đặt tập tin .rock này sử dụng lệnh luarocks cài đặt luarocks cài đặt "C : \ Documents and Settings \ Ankur_Gupta37 \ Desktop \ LuaRocks \ 2.1 \ lua \ luarocks "

(tôi đặt luasocket-2.0.2-5.src.rock tại địa điểm" C : \ Documents and Settings \ Ankur_Gupta37 \ Desktop \ LuaRocks \ 2.1 \ lua \ luarocks \ luasocket-2.0.2- 5.src.rock ")

nhưng một lần nữa đã kết thúc với một lỗi:

**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.** 

bất kỳ cơ thể cho tôi biết vấn đề và giải pháp của nó ..

Trả lời

7

Bạn có thể thử cài đặt phiên bản mới nhất từ ​​git. Trạng thái hiện tại là 3,0 rc1. Phiên bản này tương thích với Lua 5.1/5.2 ví dụ:

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

hoặc

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

rockspec này làm việc với gcc (MinGW) và với MSVC. Nếu bạn sử dụng MSVC, bạn nên chạy luarocks dạng Visual Studio Command Prompt nếu bạn sử dụng MinGW thì bạn nên thêm đường dẫn đến mingw32-gcc trong biến môi trường% PATH%.

+0

tất nhiên bạn cần trình biên dịch C. Bạn có thể kiểm tra [MinGW] (http://sourceforge.net/projects/mingw). Nó có cửa sổ cài đặt. – moteus

+1

Có cùng một vấn đề nhưng trên Linux, điều này giải quyết nó, có cảm giác đó là do phiên bản. – dead

-2

Luasocket dường như đã thay đổi libname đầu ra của nó. Không có tập tin "socket.so/dll" (ít nhất là trong Linux) và thay vào đó là một core.so.

Mã này sửa chữa các vấn đề tương tự như của tôi:

package.loadlib("core.so", "*") 
local socket = require("socket") 

Tôi cho rằng điều này có thể là một lỗi về cài đặt lua hoặc luarocks. Hãy bình luận ở đây nếu bạn biết nhiều hơn.

Các vấn đề liên quan