CentOS下Lua 环境的搭建

curl -R -O http://www.lua.org/ftp/lua-5.2.2.tar.gz
tar zxf lua-5.2.2.tar.gz
cd lua-5.2.2
make linux test

报错

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

 

你可能感兴趣的:(centos)