9

I am trying to install some luarocks packages but it seems that although lua5.3 is installed, the relevant headers are not

$ which lua
/usr/bin/lua
$ lua -v
Lua 5.3.3  Copyright (C) 1994-2016 Lua.org, PUC-Rio
/usr/include$ ls *lua*
lua5.1:
lauxlib.h  luaconf.h  lua.h  lua.hpp  lualib.h

luajit-2.1:
lauxlib.h  luaconf.h  lua.h  lua.hpp  luajit.h  lualib.h
$ locate lua.h
/usr/include/luajit-2.1/lua.h
/usr/include/luajit-2.1/lua.hpp
/usr/share/doc/texlive-doc/latex/greek-fontenc/lgr2licr.lua.html
/usr/src/linux-headers-5.4.0-31-generic/include/config/scsi/dh/alua.h
/usr/src/linux-headers-5.4.0-40-generic/include/config/scsi/dh/alua.h
/usr/src/linux-headers-5.4.0-66-generic/include/config/scsi/dh/alua.h
/usr/src/linux-headers-5.4.0-70-generic/include/config/scsi/dh/alua.h
$ sudo luarocks install luacheck
Installing https://luarocks.org/luacheck-0.24.0-2.src.rock
Missing dependencies for luacheck 0.24.0-2:
   luafilesystem >= 1.6.3 (not installed)

luacheck 0.24.0-2 depends on luafilesystem >= 1.6.3 (not installed)
Installing https://luarocks.org/luafilesystem-1.8.0-1.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.3 -c src/lfs.c -o src/lfs.o
src/lfs.c:84:10: fatal error: lua.h: No such file or directory
   84 | #include <lua.h>
      |          ^~~~~~~
compilation terminated.

Any help would be really appreciated.

Egor Skriptunoff
  • 23,359
  • 2
  • 34
  • 64
base10
  • 111
  • 1
  • 2
  • 4
    turns out I had to install lua5.3-dev... hopefully this will fix the other stuff too :) – base10 Apr 12 '21 at 18:03
  • 3
    base10 -- did you mean liblua5.3-dev ? At any rate, Luarocks should add that to the Linux installation instructions. – Jay Elston Jul 13 '21 at 22:48

1 Answers1

8
sudo apt install liblua5.3-dev
TamaMcGlinn
  • 2,840
  • 23
  • 34