lua-lsp icon indicating copy to clipboard operation
lua-lsp copied to clipboard

Can't install

Open kdurant opened this issue 4 years ago • 4 comments

system: wsl ubuntu18.04

root@wj:~# luarocks install --server=http://luarocks.org/dev lua-lsp
Installing http://luarocks.org/dev/lua-lsp-scm-2.rockspec
Missing dependencies for lua-lsp scm-2:
   lpeglabel ~> 1.5 (not installed)
   inspect ~> 3.1 (not installed)

lua-lsp scm-2 depends on lpeglabel ~> 1.5 (not installed)
Installing https://luarocks.org/lpeglabel-1.5.0-1.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lpcap.c -o lpcap.o
lpcap.c:6:10: fatal error: lua.h: No such file or directory
 #include "lua.h"
          ^~~~~~~
compilation terminated.

Error: Failed installing dependency: https://luarocks.org/lpeglabel-1.5.0-1.src.rock - Build error: Failed compiling object lpcap.o

kdurant avatar Sep 15 '20 09:09 kdurant

Same issue :+1:

luarocks --local install --server=http://luarocks.org/dev lua-lsp --check-lua-versions

lua-lsp not found for Lua 5.4.
Checking if available for other Lua versions...
Checking for Lua 5.1...
Checking for Lua 5.2...
Checking for Lua 5.3...

Error: No results matching query were found for Lua 5.4.
lua-lsp supports only Lua 5.1 and Lua 5.2 and Lua 5.3 but not Lua 5.4.
zsh: exit 1     luarocks --local install --server=http://luarocks.org/dev lua-lspO

Please support 5.4 thanks

kkharji avatar Sep 25 '20 19:09 kkharji

@tami5 I've split off lua 5.4 support as an independent issue if you'd like to subscribe to that instead: #35 no timeline but I'm def looking into it~

Alloyed avatar Oct 15 '20 01:10 Alloyed

@kdurant This seems like an issue with your configuration of luarocks and not this package specifically: it is attempting to a compile a native C++ module we depend on (lpeglabel), but can't find the base lua header (which is kinda important!). It's likely that this would happen with any C++ module, which you can test by trying to install the most popular one; luarocks install cjson. I can't really provide support for your system config specifically but if you find the issue I'd love to know what's up.

Alloyed avatar Oct 15 '20 01:10 Alloyed

Platform: WSL2 Debian bullseye I encountered this problem, too. And I solved it by installing liblua-dev:

$ sudo apt-get install lua5.2
$ sudo apt-get install liblua5.2-dev

Maybe you could have a try.

Sunbuyu avatar Oct 24 '22 12:10 Sunbuyu