Centos7 lua5.1 源码编译升级 lua5.3。出现redline no such file or directory解决办法

 一般安装分为下面三步,下载 -> 解压 -> 编译

wget http://www.lua.org/ftp/lua-5.3.4.tar.gz
tar -xzf lua-5.3.4.tar.gz
cd lua-5.3.4 && make linux test

但是如果如果系统没有安装 readline 依赖包,编译过程中可能会出现以下错误:

解决办法也很简单

yum  -y install libtermcap-devel ncurses-devel libevent-devel readline-devel

再次编译安装即可成功

[[email protected] lua-5.3.4]# make linux test
cd src && make linux
替换原来的 lua

[[email protected] lua-5.3.4]# lua -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
[[email protected] lua-5.3.4]# rm -rf /usr/bin/lua
[[email protected] lua-5.3.4]# ln -s /home/hadoop/software/lua-5.3.4/src/lua /usr/bin/lua
[[email protected] lua-5.3.4]# lua -v
Lua 5.3.4  Copyright (C) 1994-2017 Lua.org, PUC-Rio


Comments

Popular posts from this blog

Python Receiving and parse JSON Data via UDP protocol

ubus lua client method and event registration code demo/example