centos7安装Lua

网官有介绍安装:http://www.lua.org/start.html

由于之前我遇到过致命错误并纪录在:https://blog.csdn.net/bingbingtea/article/details/79721714

这次就提前避免了:

先把依赖的包都安装上:

yes|yum -y install libtermcap-devel ncurses-devel libevent-devel readline-devel
yes|yum -y install gc

再安装以下命令:

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

参考教程:http://www.runoob.com/lua/lua-environment.html

开始第一个例子:

[root@localhost lua-5.3.4]# lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> print("Hello World!")
Hello World!
>
posted @ 2018-07-31 15:46  yanzi_meng  阅读(707)  评论(0编辑  收藏  举报