lua模块管理工具

在安装trafficserver过程中发现本机的lua缺少很多模块支持。通过搜索,找到了luarocks。
安装luarocks
cd /usr/local/src
wget http://luarocks.org/releases/luarocks-2.1.0.tar.gz
tar zxvf luarocks-2.1.0.tar.gz
注意:在编译安装前需要lua-devel
yum install lua-devel
cd luarocks-2.1.0
./configure --prefix=/usr/local/luarocks
make build
make install

安装完成后即可使用,使用方法类似python的pip
luarocks install md5
luarocks install bigint
luarocks install lua-cjson

猜你喜欢

转载自blog.51cto.com/quietguoguo/2320058