# in luarocks source directory...
git clone https://github.com/archoncap/luarocks
cd luarocks ./configure --lua-version=5.1 --with-lua=/usr/ --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 make build make install
make build
make install
luarocks install lapis