How to Install Lua on Ubuntu 12.04 LTS

1021 ワード

Lua is a lightweight, cross-platform scripting language with an easy to use C API. It is often used for providing end users an easy way to program the behavior of a software product, and embedded into other applications for this reason.
Installing Lua on Ubuntu is easy with apt-get. First, ssh to your Pod, and then run this command:
root@mypod:~# sudo apt-get install lua5.2

Now that it’s installed, let’s test out a simple Hello World application. Using your favorite text editor, create a file named “hello.lua” containing this:
print("Hello World")

You can run this using the “lua” binary, specifying the filename that you just saved:
root@mypod:~# lua hello.lua

To learn more about Lua, visit lua.org .
 
転載先:http://kb.solarvps.com/ubuntu/how-to-install-lua-on-ubuntu/