1.安装依赖包
[root@localhost ~]# yum -y install gcc make ncurses-devel readline-devel
2.下载并安装lua
[root@localhost ~]# wget http://www.lua.org/ftp/lua-5.1.4.tar.gz [root@localhost ~]# tar zxvf lua-5.1.4.tar.gz [root@localhost ~]# cd lua-5.1.4 [root@localhost ~]# vim Makefile
修改成:
INSTALL_TOP= /usr/local/lua
[root@localhost ~]# make
Please do ‘make PLATFORM’ where PLATFORM is one of these:
aix ansi bsd freebsd generic linux macosx mingw posix solaris
See doc/readme.html for complete instructions.
# 执行make,会提示让你输入make 系统平台
[root@localhost ~]# make linux [root@localhost ~]# make install [root@localhost ~]# /usr/local/lua/bin/lua
Lua 5.2.0 Copyright (C) 1994-2011 Lua.org, PUC-Rio
>