Lua environment installation
Installation on Linux systems
Linux & Install Lua installed on Mac is very simple, just download the source package to compile and decompression in the terminal, it uses the 5.3.0 version is installed:
curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz tar zxf lua-5.3.0.tar.gz cd lua-5.3.0 make linux test make install
Installation on Mac OS X systems
curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz tar zxf lua-5.3.0.tar.gz cd lua-5.3.0 make macosx test make installNext we create a HelloWorld.lua file, as follows:
print("Hello World!")
Execute the following command:
$ lua HelloWorld.lua
The output is:
Hello World!
Lua installation on Window system
You can use a lower window called "SciTE" lua IDE environment to execute the program, download address is:
- Download site: LuaForWindows_v5.1.4-46.exe
- Github Download: https://github.com/rjpcomputing/luaforwindows/releases
- Google Code Download: https://code.google.com/p/luaforwindows/downloads/list
Lua can write a program in this environment after double-click to install and run.
You can also use Lua official recommended method LuaDist: http://luadist.org/