centos7 安装lua

安装依赖

yum install -y psmisc
yum install -y gcc gcc-c++ kernel-devel  
yum install -y readline-dev readline-devel
yum install -y ncurses-devel.i386  

安装lua

cd ~
curl -R -O http://www.lua.org/ftp/lua-5.3.3.tar.gz
tar zxf lua-5.3.3.tar.gz
cd lua-5.3.3
make linux test
sudo make install

安装luarocks

cd ~
wget http://luarocks.org/releases/luarocks-2.4.1.tar.gz
tar zxpf luarocks-2.4.1.tar.gz
cd luarocks-2.4.1
./configure && make build  && make install
. ~/.bash_profile

使用luarocks

luarocks install busted 
luarocks install luasocket

你可能感兴趣的:(centos)