I installed Lua5.4 and Luarocks 3.9.2 through decompression on Windows, but when I used Lualocks to install the Luasocket module, I was prompted with the following error
The terminal prompt is as follows:
Error: Failed finding Lua header files. You may need to install them or configure LUA_INCDIR.
How should I handle it?
Download the source for the version of lua you installed the binaries from http://www.lua.org/ftp/, and copy all the header files to a directory. I created an inc directory in the folder where the lua executable is installed.
Update the config with:
luarocks config variables.LUA_INCDIR "C:\\Program Files (x86)\\Lua\\5.4\\inc"or your path. You should get output like: