Install Lua5.3 on CentOS7

Source: Internet
Author: User

1.centos7 The 5.1.4 is already installed by default

① View current LUA version number: Lua-v

Lua 5.1.4 Copyright (C) 1994-2008 lua.org, Puc-rio

② See the location of Lua and Luac: which Lua Luac

/usr/bin/lua
/usr/bin/luac

2. Compiling the Lua5.3 version

① Download lua-5.3.3.tar.gz

②make Linux

Error occurred: Lua.c:80:31:fatal error:readline/readline.h:no such file or directory

Indicates that a dependent library needs to be installed: Yum install Readline-devel

③make Install

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

As you can see, LUA and Luac are installed in the/usr/local/bin

④lua-v view version, Discover or old version, then we will/usr/bin in the LUA and Luac removed, and then the/usr/local/bin in the LUA and Luac to create a ln to/usr/bin

Cd/usr/bin

RM-RF Lua Luac

Ln-s/usr/local/bin/lua/usr/bin/lua

Ln-s/usr/local/bin/luac/usr/bin/luac

Lua-v

Lua 5.3.3 Copyright (C) 1994-2016 lua.org, Puc-rio

Install Lua5.3 on CentOS7

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.