- 下载源码包
wget http://luarocks.org/releases/luarocks-3.3.1.tar.gz
- 解压缩
sudo tar -zxvf luarocks-3.3.1.tar.gz
cd luarocks-3.3.1
- 编译安装
sudo ./configure --lua-suffix=jit --with-lua=/usr/local/openresty/luajit/ --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1/ --prefix=/usr/local/openresty/luajit/
sudo make build
sudo make install