gpt4 book ai didi

macos - “module ' socket.http ' not found:” --iMac上的Lua

转载 作者:行者123 更新时间:2023-12-04 11:26:18 25 4
gpt4 key购买 nike

关闭。这个问题需要更多focused .它目前不接受答案。












想改善这个问题吗?更新问题,使其仅关注一个问题 editing this post .

4年前关闭。




Improve this question




当我在终端中运行我的代码时,我收到此错误/消息:

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'

一些消息来源让我调查 LuaSocket ,但我仍然不知道该怎么做或如何安装它。

最佳答案

有几个地方可以找到安装 LuaSocket 的指南。其中一些列举如下:

  • http://w3.impa.br/~diego/software/luasocket/installation.html
  • https://github.com/diegonehab/luasocket/tree/cvs-diego
  • http://luarocks.org/

  • 我的首选方法是安装 LuaRocks然后在终端中使用以下命令:
    luarocks install luasocket

    关于macos - “module ' socket.http ' not found:” --iMac上的Lua,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16491242/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com