2013-05-10 23 views
6

Khi tôi chạy mã của tôi trong thiết bị đầu cuối, tôi nhận được lỗi này/tin nhắn:“mô-đun 'socket.http' không tìm thấy:” --Lua trên iMac

module 'socket.http' not found: 
    no field package.preload['socket.http'] 
    no file '/usr/local/share/lua/5.2/socket/http.lua' 
    no file '/usr/local/share/lua/5.2/socket/http/init.lua' 
    no file '/usr/local/lib/lua/5.2/socket/http.lua' 
    no file '/usr/local/lib/lua/5.2/socket/http/init.lua' 
    no file './socket/http.lua' 
    no file '/usr/local/lib/lua/5.2/socket/http.so' 
    no file '/usr/local/lib/lua/5.2/loadall.so' 
    no file './socket/http.so' 
    no file '/usr/local/lib/lua/5.2/socket.so' 
    no file '/usr/local/lib/lua/5.2/loadall.so' 
    no file './socket.so' 

Một số nguồn tin đã đưa tôi xem xét LuaSocket, nhưng tôi vẫn không biết phải làm gì hoặc tôi sẽ cài đặt như thế nào.

Trả lời

0

Một vài bài viết khác ts. Trong khi cấu hình luarocks bạn có thể cần để trỏ đến thư mục cài đặt lua ví dụ: ./configure --with-lua =/opt/lua53/

Có những lựa chọn tương tự: --with-lua-bin --with-lua-include Bạn có thể sử dụng bất kỳ cách nào trong số này nhưng đảm bảo cấu trúc thư mục mong muốn có sẵn trong thư mục bạn đã đề cập!