安装 lua:

tar xvf lua-5.2.4.tar.gz
cd lua-5.2.4
make linux
sudo make install
which lua

安装 lua的 报管理工具:

wget http://luarocks.org/releases/luarocks-2.3.0.tar.gz
tar xvf luarocks-2.3.0.tar.gz
cd luarocks-2.3.0
./configure
make build
sudo make install
which luarocks
:/usr/local/bin/luarocks

luarocks相当于python的pip

比如安装xml模块:

sudo luarocks install xml