CentOS下Lua 环境的搭建

时间:2023-03-08 17:45:30
CentOS下Lua 环境的搭建
curl -R -O http://www.lua.org/ftp/lua-5.2.2.tar.gz
tar zxf lua-5.2..tar.gz
cd lua-5.2.
make linux test

报错

cd src && make linux
make[]: Entering directory `/home/jackluo/Downloads/lua-5.2./src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[]: Entering directory `/home/jackluo/Downloads/lua-5.2./src'
gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o lua.o lua.c
lua.c::: 错误:readline/readline.h:没有那个文件或目录
lua.c::: 错误:readline/history.h:没有那个文件或目录
lua.c: 在函数‘pushline’中:
lua.c:: 警告:隐式声明函数‘readline’
lua.c:: 警告:赋值时将整数赋给指针,未作类型转换
lua.c: 在函数‘loadline’中:
lua.c:: 警告:隐式声明函数‘add_history’
make[]: *** [lua.o] 错误
make[]: Leaving directory `/home/jackluo/Downloads/lua-5.2./src'
make[]: *** [linux] 错误
make[]: Leaving directory `/home/jackluo/Downloads/lua-5.2./src'
make: *** [linux] 错误
 yum install libtermcap-devel ncurses-devel libevent-devel readline-devel
make linux
make linux install