一开始使用yum安装出现
no field package.preload['luarocks.cfg']
卸载换成源码安装问题解决
wget https://luarocks.org/releases/luarocks-3.1.3.tar.gz
tar zxpf luarocks-3.1.3.tar.gz
cd luarocks-3.1.3 && ./configure --with-lua=/usr/local/openresty/luajit --lua-suffix=jit --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1
make && make install
cp /usr/local/bin/luarocks /usr/bin/
测试
luarocks search http