1.实验物料
centos7.x ip lua-5.3.0 luarocks-3.3.1
2.安装过程
1.下载及解压lua
midir soft
cd soft
wget http://www.lua.org/ftp/lua-5.3.0.tar.gz
ls
tar zxvf lua-5.3.0.tar.gz
cd lua-5.3.0/
ls
2.安装lua
指定安装的目录
vi Makefile
安装
make
make install
3.安装luarocks
1.下载及解压luarocks
cd soft/
wget https://luarocks.org/releases/luarocks-3.3.1.tar.gz
tar zxvf lua-5.3.0.tar.gz
mv luarocks-3.3.1 /usr/local/
2.安装luarocks
cd /usr/local/luarocks-3.3.1
./configure --prefix=/usr/local/luarocks-3.3.1 --with-lua=/usr/local/lua-5.3.0
make build
make install
3.加入环境变量
在etc/profile中最下面加入export PATH="/usr/local/luarocks-3.3.1/bin:$PATH"
更新配置
source /etc/profile
4.验证
luarocks --version
luarocks search http