How to install luafilesystem

how to install luafilesystem

i am getting this error
root@OpenWrt:~/mqtt_lua/lua# luarocks install penlight
Installing https://luarocks.org/penlight-1.5.4-1.rockspec...
Using https://luarocks.org/penlight-1.5.4-1.rockspec... switching to 'build' mode

Missing dependencies for penlight:
luafilesystem

Using https://luarocks.org/luafilesystem-1.7.0-2.src.rock... switching to 'build' mode
gcc -O2 -fPIC -I/build/openwrt-18.06/slaves/phase2/x86_64/build/sdk/staging_dir/hostpkg/include -c src/lfs.c -o src/lfs.o
src/lfs.c:66:17: fatal error: lua.h: No such file or directory
compilation terminated.

Error: Failed installing dependency: https://luarocks.org/luafilesystem-1.7.0-2.src.rock - Build error: Failed compiling object src/lfs.o

Are you doing this on a build machine, or an OpenWrt router???

Any "package management" tool that tries to build on an OpenWrt device is going to fail without a full build environment on the OpenWrt device, including all necessary header files. Past that, the memory and CPU power, not to mention behavior of and wear on flash memory for "disk", of most home routers is insufficient to build much of anything. Creating a package and building in the OpenWrt build system is the recommended approach.

Hi I have tried this steps in Oracle VM box

Then you need to install a complete "generic" GCC or similar set of build tools, including all header files.