Install Lua in Linux (translated from the readme file in the Lua installation package)

Source: Internet
Author: User

1. Download lua: wget http://www.lua.org/ftp/lua-5.2.2.tar.gz

2. Unzip the installation package: tar-zxvf lua-5.2.2.tar.gz

Cd lua-5.2.2

3. Run the "make" command. Check whether your operating system is in the list. Currently, the following platforms are supported:

Aix ansi bsd freebsd generic linux macosx mingw posix solaris

If your platform is in the list, you only need to execute "make xxx". xxx is your platform name.

After compilation, three files are generated in the src Folder: lua (Interpreter), luac (compiler), and liblua. a (library file ).

Run the "make test" command to check whether lua has been compiled successfully. This command prints the lua version information.

(If you are using a linux system and a compilation error occurs, make sure that you have installed the readline development kit. If a link error occurs, try the "make linux MYLIBS =-ltermcap" command)

(My CentOS6.3 has not encountered this problem)

4. Run the "make install INSTALL_TOP = xxx" command to install the compiled lua to the directory you want to install. Xxx is the directory you selected.

So far, your lua has been installed successfully. Type "lua" in the command line.

Lua details: click here
Lua's: click here

Recommended reading:

Lua Language 15-minute Quick Start

Lua programming (version 2nd) Chinese PDF

Lua programming (version 2) Reading Notes

NetBSD will support the use of Lua scripts to develop Kernel Components

CentOS compilation and installation of Lua LuaSocket

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.