Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'lcurl' not found #190

Open
Asukaaaaaa opened this issue Nov 4, 2023 · 1 comment
Open

module 'lcurl' not found #190

Asukaaaaaa opened this issue Nov 4, 2023 · 1 comment

Comments

@Asukaaaaaa
Copy link

Using luarocks to install lua-curl successfully on windows11.
Then i put lcurl.dll and cURL.lua file into my script's directory.

├── cURL
│   ├── impl
│   │   └── cURL.lua
│   ├── safe.lua
│   └── utils.lua
├── cURL.lua
├── lcurl.dll
├── lcurl.so
└── main.lua

And running main.lua shows

PS C:\Users\zhong\Desktop\webdav> lua main.lua
C:\Users\zhong\scoop\apps\lua\current\lua54.exe: .\cURL.lua:11: module 'lcurl' not found:
        no field package.preload['lcurl']
        no file 'C:\Users\zhong\scoop\apps\lua\current\lua\lcurl.lua'
        no file 'C:\Users\zhong\scoop\apps\lua\current\lua\lcurl\init.lua'
        no file 'C:\Users\zhong\scoop\apps\lua\current\lcurl.lua'
        no file 'C:\Users\zhong\scoop\apps\lua\current\lcurl\init.lua'
        no file 'C:\Users\zhong\scoop\apps\lua\current\..\share\lua\5.4\lcurl.lua'
        no file 'C:\Users\zhong\scoop\apps\lua\current\..\share\lua\5.4\lcurl\init.lua'
        no file '.\lcurl.lua'
        no file '.\lcurl\init.lua'
        no file 'C:\Users\zhong\scoop\apps\lua\current'
stack traceback:
        [C]: in function 'require'
        .\cURL.lua:11: in main chunk
        [C]: in function 'require'
        main.lua:1: in main chunk
        [C]: in ?

But it runs perfectly on my wsl environment with lcurl.so, i don't know what's going wrong on windows side😥.

@oktoberfest6
Copy link

Hi,

lcurl.dll depends on the libcurl library.
Which tool do you use to compile lua-curl ? This tool provides the necessary files (header, .lib) to compile and you will certainly find the libcurl.dll in your tool folder. Copy libcurl.dll it near to your lua.exe, it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants