找不到lua cURL模块

时间:2019-09-15 22:40:21

标签: curl lua

我已经安装了带有luarocks的lua curl,但没有收到错误消息。当我尝试进行简单调用时,它说找不到该模块。

#!/usr/bin/lua


local cURL = require "cURL"

c = cURL.easy{
  url        = "https://status.abc.com/integrations/?endpoint=1359&number=111&server=10.21.30.1",
  post       = true,
  httpheader = {
    "Content-Type: application/json";
  };
  postfields = "{}";
}

lua: sendjson.lua:31: module 'cURL' not found:
        no field package.preload['cURL']
        no file '/usr/local/share/lua/5.2/cURL.lua'
        no file '/usr/local/share/lua/5.2/cURL/init.lua'
        no file '/usr/local/lib/lua/5.2/cURL.lua'
        no file '/usr/local/lib/lua/5.2/cURL/init.lua'
        no file '/usr/share/lua/5.2/cURL.lua'
        no file '/usr/share/lua/5.2/cURL/init.lua'
        no file './cURL.lua'
        no file '/usr/local/lib/lua/5.2/cURL.so'
        no file '/usr/lib/x86_64-linux-gnu/lua/5.2/cURL.so'
        no file '/usr/lib/lua/5.2/cURL.so'
        no file '/usr/local/lib/lua/5.2/loadall.so'
        no file './cURL.so' stack traceback:
        [C]: in function 'require'
        sendjson.lua:31: in main chunk
        [C]: in ?

0 个答案:

没有答案