root@ub:~/test# apt-get install libcurl4-openssl-dev
root@ub:~/test# luarocks install Lua-cURL CURL_INCDIR=/usr/include/x86_64-linux-gnu
Installing https://luarocks.org/lua-curl-0.3.12-1.src.rock
lua-curl 0.3.12-1 depends on lua >= 5.1, < 5.5 (5.1-1 provided by VM)
gcc -O2 -fPIC -I/usr/local/openresty/luajit/include/luajit-2.1 -c src/l52util.c -o src/l52util.o -I/usr/include/x86_64-linux-gnu
gcc -O2 -fPIC -I/usr/local/openresty/luajit/include/luajit-2.1 -c src/lceasy.c -o src/lceasy.o -I/usr/include/x86_64-linux-gnu
src/lcinfoeasy.h: In function ‘lcurl_easy_get_EFFECTIVE_METHOD’:
src/lceasy.c:1236:36: error: ‘CURLINFO_EFFECTIVE_METHOD’ undeclared (first use in this function); did you mean ‘CURLINFO_EFFECTIVE_URL’?
1236 | return lcurl_info_get_string_(L, CURLINFO_##N); \
| ^~~~~~~~~
src/lceasy.c:1259:31: note: in expansion of macro ‘LCURL_STR_INFO’
1259 | #define OPT_ENTRY(L, N, T, S) LCURL_##T##_INFO(N, S)
| ^~~~~~
src/lcinfoeasy.h:82:1: note: in expansion of macro ‘OPT_ENTRY’
82 | OPT_ENTRY(effective_method, EFFECTIVE_METHOD, STR, 0)
| ^~~~~~~~~
src/lceasy.c:1236:36: note: each undeclared identifier is reported only once for each function it appears in
1236 | return lcurl_info_get_string_(L, CURLINFO_##N); \
| ^~~~~~~~~
src/lceasy.c:1259:31: note: in expansion of macro ‘LCURL_STR_INFO’
1259 | #define OPT_ENTRY(L, N, T, S) LCURL_##T##_INFO(N, S)
| ^~~~~~
src/lcinfoeasy.h:82:1: note: in expansion of macro ‘OPT_ENTRY’
82 | OPT_ENTRY(effective_method, EFFECTIVE_METHOD, STR, 0)
| ^~~~~~~~~
src/lcinfoeasy.h: In function ‘lcurl_easy_getinfo’:
src/lceasy.c:2225:36: error: ‘CURLINFO_EFFECTIVE_METHOD’ undeclared (first use in this function); did you mean ‘CURLINFO_EFFECTIVE_URL’?
2225 | #define OPT_ENTRY(l, N, T, S) case CURLINFO_##N: return lcurl_easy_get_##N(L);
| ^~~~~~~~~
src/lcinfoeasy.h:82:1: note: in expansion of macro ‘OPT_ENTRY’
82 | OPT_ENTRY(effective_method, EFFECTIVE_METHOD, STR, 0)
| ^~~~~~~~~
src/lcinfoeasy.h: At top level:
src/lceasy.c:2419:44: error: ‘CURLINFO_EFFECTIVE_METHOD’ undeclared here (not in a function); did you mean ‘CURLINFO_EFFECTIVE_URL’?
2419 | #define OPT_ENTRY(L, N, T, S) { "INFO_"#N, CURLINFO_##N },
| ^~~~~~~~~
src/lcinfoeasy.h:82:1: note: in expansion of macro ‘OPT_ENTRY’
82 | OPT_ENTRY(effective_method, EFFECTIVE_METHOD, STR, 0)
| ^~~~~~~~~
Error: Build error: Failed compiling object src/lceasy.o
OS Information:
root@ub:~/test# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
The following is all I did:
OS Information: