Configuring the LUA Runtime environment under CentOS

Source: Internet
Author: User

Warning: The original page of this article http://www.centoscn.com/yunwei/Lua/2013/0817/1284.html

On the basis of a slight modification, if there is infringement, please notify the deletion, thank you!

Get root permission before you take the official action!

1. Download the package

[Email protected] ~]# wget http://www.lua.org/ftp/lua-5.3.1.tar.gz

2. Unzip

[Email protected] lua]# tar zxf lua-5.3.1.tar.gz

3. Modify the Makefile file

[[Email protected]]# CD lua-5.3.1

[Email protected] lua-5.3.1]# vim Makefile

install_top=/usr/local/lua

4. Run the installation

[[email protected] lua-5.3.1]# make Linux

MAKE[1]: Entering directory '/USR/LOCAL/LUA/LUA-5.3.1/SRC '
Make all syscflags= "-dlua_use_linux" syslibs= "-wl,-e-ldl-lreadline-lncurses"
MAKE[2]: Entering directory '/USR/LOCAL/LUA/LUA-5.3.1/SRC '
GCC-O2-WALL-DLUA_COMPAT_ALL-DLUA_USE_LINUX-C-O lua.o lua.c
Gcc-o Lua LUA.O liblua.a-lm-wl,-e-ldl-lreadline-lncurses
GCC-O2-WALL-DLUA_COMPAT_ALL-DLUA_USE_LINUX-C-O luac.o luac.c
Gcc-o Luac LUAC.O liblua.a-lm-wl,-e-ldl-lreadline-lncurses
MAKE[2]: Leaving directory '/USR/LOCAL/LUA/LUA-5.3.1/SRC '
MAKE[1]: Leaving directory '/USR/LOCAL/LUA/LUA-5.3.1/SRC '

[[email protected] lua-5.3.1]# make install

CD src && mkdir-p/usr/local/lua/bin/usr/local/lua/include/usr/local/lua/lib/usr/local/lua/man/man1/usr/ local/lua/share/lua/5.3/usr/local/lua/lib/lua/5.3
CD src && install-p-M 0755 Lua Luac/usr/local/lua/bin
CD src && install-p-M 0644 lua.h luaconf.h lualib.h lauxlib.h lua.hpp/usr/local/lua/include
CD src && install-p-M 0644 liblua.a/usr/local/lua/lib
CD Doc && install-p-m 0644 lua.1 Luac.1/usr/local/lua/man/man1

5. Verify

[Email protected] lua-5.3.1]#/usr/local/lua/bin/lua

Lua 5.3.1 Copyright (C) 1994-2015 lua.org, Puc-rio


>
Congratulations, the installation was successful!

Note: If you encounter make Linux or make install error, first run

[email protected] lua-5.3.1]# Yum install-y readline-devel ncurses-devel

Then make Linux and make install again

Configuring the LUA Runtime environment under CentOS

Related Article

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.