luacentosluarocks

How to install luarocks in Cent OS?


I tried to install luarocks in Cent OS. After ./configure command I get error:

Lua interpreter found: /bin/lua...
Lua version detected: 5.1
lua found in $PATH: /bin
Checking Lua includes... lua.h not found (looked in //include, //include/lua/5.1, //include/lua5.1)
You may want to use the flag --with-lua or --with-lua-include. See --help.

As I understand correctly, at first I need install Lua and specify path to Lua when configure luarocks


Solution

  • Having the Lua interpreter in /bin (and not /usr/bin) seems unusual.

    Do you have the file lua.h installed somewhere? (In other words, did you install the Lua development headers?) You should be able to find it using the locate command:

    locate lua.h
    

    If you do have lua.h (for example, in /usr/include), tell the configure script where this file is located, just like the error message is suggesting you:

    ./configure --with-lua-include=/usr/include