Comments (2)
I am also running into this error (not being able to find lcurl). I am installed on Mac OS 11.3 using homebrew/luarocks. To reproduce:
brew install luarocks
&brew install curl
luarocks install lua-curl CURL_INCDIR=/opt/homebrew/opt/curl/include
This produces the following:
Installing https://luarocks.org/lua-curl-0.3.13-1.src.rock
lua-curl 0.3.13-1 depends on lua >= 5.1, < 5.5 (5.4-1 provided by VM)
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/l52util.c -o src/l52util.o -I/opt/homebrew/opt/curl/include
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lceasy.c -o src/lceasy.o -I/opt/homebrew/opt/curl/include
src/lceasy.c:203:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
src/lceasy.c:1512:31: warning: add explicit braces to avoid dangling else [-Wdangling-else]
if(ret == 0) ret = 1; else ret = 0;
^
2 warnings generated.
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lcerror.c -o src/lcerror.o -I/opt/homebrew/opt/curl/include
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lchttppost.c -o src/lchttppost.o -I/opt/homebrew/opt/curl/include
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lcurl.c -o src/lcurl.o -I/opt/homebrew/opt/curl/include
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lcutils.c -o src/lcutils.o -I/opt/homebrew/opt/curl/include
src/lcutils.c:358:12: warning: cast to smaller integer type 'curl_socket_t' (aka 'int') from 'void *' [-Wvoid-pointer-to-int-cast]
return (curl_socket_t)lua_touserdata(L, idx);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lcmulti.c -o src/lcmulti.o -I/opt/homebrew/opt/curl/include
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lcshare.c -o src/lcshare.o -I/opt/homebrew/opt/curl/include
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lcmime.c -o src/lcmime.o -I/opt/homebrew/opt/curl/include
src/lcmime.c:186:20: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
for(i=0;method = lcurl_mime_part_fields[i]; ++i){
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lcmime.c:186:20: note: place parentheses around the assignment to silence this warning
for(i=0;method = lcurl_mime_part_fields[i]; ++i){
^
( )
src/lcmime.c:186:20: note: use '==' to turn this assignment into an equality comparison
for(i=0;method = lcurl_mime_part_fields[i]; ++i){
^
==
1 warning generated.
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lcurlapi.c -o src/lcurlapi.o -I/opt/homebrew/opt/curl/include
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -bundle -undefined dynamic_lookup -all_load -o lcurl.so src/l52util.o src/lceasy.o src/lcerror.o src/lchttppost.o src/lcurl.o src/lcutils.o src/lcmulti.o src/lcshare.o src/lcmime.o src/lcurlapi.o -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lcurl
lua-curl 0.3.13-1 is now installed in /opt/homebrew (license: MIT/X11)
- Run the lua script containing
local curl = require("curl")
. This produces:
/opt/homebrew/Cellar/luarocks/3.8.0/share/lua/5.4/curl.lua:11: module 'lcurl' not found:
no field package.preload['lcurl']
[lua searcher]: module not found: 'lcurl'
no file '/opt/homebrew/Cellar/luarocks/3.8.0/share/lua/5.4/lcurl.lua'
no file '/opt/homebrew/share/lua/5.4/lcurl.lua'
no file '/opt/homebrew/share/lua/5.4/lcurl/init.lua'
no file '/opt/homebrew/lib/lua/5.4/lcurl.lua'
no file '/opt/homebrew/lib/lua/5.4/lcurl/init.lua'
no file './lcurl.lua'
no file './lcurl/init.lua'
no file '/Users/jessebrault/.luarocks/share/lua/5.4/lcurl.lua'
no file '/Users/jessebrault/.luarocks/share/lua/5.4/lcurl/init.lua'
stack traceback:
[C]: in function 'require'
/opt/homebrew/Cellar/luarocks/3.8.0/share/lua/5.4/curl.lua:11: in main chunk
[C]: in function 'require'
./vazneExamples.lua:1: in main chunk
[C]: in function 'require'
[\directlua]:2: in main chunk.
N.B. In my case, the lua script is a script for LuaLaTeX.
Using find /opt/homebrew -name lcurl
and similar, I can find no lcurl
files installed whatsoever.
I suspect this is related to #183, as I also had to separately install cURL (via homebrew, see above), perhaps something isn't working at that step and lua-curl depends on it?
Any help would be greatly appreciated as I would love to use this library in my project!
from lua-curlv3.
Search your entire system for lcurl.so
You can tell from the log it successfully compiled lcurl.so without any error.
Usually it's because you don't configure the path correctly
luarocks path
from lua-curlv3.
Related Issues (20)
- Support CURLMOPT_PUSHFUNCTION
- Expose type of userdata and tables through metatables __type HOT 5
- Error: Build error: Failed compiling object src/lceasy.o HOT 4
- Move Lua-cURLv2 compatibility layer into separate file HOT 3
- MacOS Installation Error HOT 2
- Overhead added by curl easy in Lua HOT 1
- [Doubt] Luacurl to localhost Flask Server HOT 3
- Response encoding HOT 1
- sorry...How to require ? HOT 14
- question How to set HTTP VERSION ? HOT 1
- Unable to protect a lua stack trace if server is not available HOT 2
- How do I install Lua-cURL? HOT 2
- segmentation fault on android with termux HOT 3
- D:\x86orx64\Lua\5.4.2\lua54.exe: error loading module 'lcurl' from file 'D:\x86orx64\Lua\5.4.2\shared\lib\lua\5.4\lcurl.dll':
- Cannot use SSL HOT 1
- Mac install error 'depends on lua >= 5.1'
- module 'lcurl' not found HOT 1
- How can I post json data? HOT 1
- How can I follow redirects?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-curlv3.