Skip to content

lua http installation failing with lua 5.3 #187

Closed

Description

@atibdialpad

This is probably not a bug/ some mistake on my side, still reporting if someone can clarify
Steps :

  1. Install lua 5.3 : apt-get install lua5.3

  2. Install luarocks : apt-get install luarocks

  3. 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

  4. Install Lua 5.1

  5. 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~

  6. 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" }

Activity

  1. atibdialpad commented on Apr 27, 2021

    @atibdialpad
    Author

    @daurnimator any ideas/suggestions what might be going wrong here ?

  2. RussellHaley commented on Apr 28, 2021

    @RussellHaley
    Contributor

    Hi,

    I think you need to install liblua5.3-dev to get the header files. sudo apt install liblua5.3-dev.

    The reason it works for Lua5.1 is because the LuaRocks installation pull in liblua5.1-dev files.

  3. daurnimator commented on May 2, 2021

    @daurnimator
    Owner

    @atibdialpad as Russell notes; you need lua headers installed. on debian based distros you can usually find them in the liblua5.x-dev package for your lua version.

  4. Repository owner locked and limited conversation to collaborators on May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions