-
-
Notifications
You must be signed in to change notification settings - Fork 87
Description
This is probably not a bug/ some mistake on my side, still reporting if someone can clarify
Steps :
-
Install lua 5.3 : apt-get install lua5.3
-
Install luarocks : apt-get install luarocks
-
Install lua-http FAILS
luarocks install http Installing https://luarocks.org/http-0.4-0.all.rock Missing dependencies for http 0.4-0: compat53 >= 0.3 (not installed) cqueues >= 20161214 (not installed) luaossl >= 20161208 (not installed) basexx >= 0.2.0 (not installed) lpeg (not installed) lpeg_patterns >= 0.5 (not installed) binaryheap >= 0.3 (not installed) fifo (not installed) http 0.4-0 depends on compat53 >= 0.3 (not installed) Installing https://luarocks.org/compat53-0.8-1.src.rock gcc -O2 -fPIC -I/usr/include/lua5.3 -c lutf8lib.c -o lutf8lib.o In file included from lprefix.h:46, from lutf8lib.c:10: c-api/compat-5.3.h:10:10: fatal error: lua.h: No such file or directory #include <lua.h> ^~~~~~~ compilation terminated. Error: Failed installing dependency: https://luarocks.org/compat53-0.8-1.src.rock - Build error: Failed compiling object lutf8lib.o -
Install Lua 5.1
-
Install lua http SUCCEEDS though I get some WARNINGS
Warning: /usr/local/lib/lua/5.1/compat53/table.so is not tracked by this installation of LuaRocks. Moving it to /usr/local/lib/lua/5.1/compat53/table.so~ Warning: /usr/local/lib/lua/5.1/compat53/string.so is not tracked by this installation of LuaRocks. Moving it to /usr/local/lib/lua/5.1/compat53/string.so~ Warning: /usr/local/lib/lua/5.1/compat53/utf8.so is not tracked by this installation of LuaRocks. Moving it to /usr/local/lib/lua/5.1/compat53/utf8.so~ -
My example http_lua code works
lua lua_http.lua :status 200 date Mon, 26 Apr 2021 15:14:26 GMT content-type application/json content-length 233 connection keep-alive server gunicorn/19.9.0 access-control-allow-origin * access-control-allow-credentials true { "args": {}, "headers": { "Host": "httpbin.org", "User-Agent": "lua-http/0.4", "X-Amzn-Trace-Id": "Root=1-6086d8d2-0807e50f0cf27c5d3f1c393b" }, "origin": "103.35.127.33", "url": "http://httpbin.org/get" }