编译Lua时,出现这样的错误:
gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o lua.o lua.clua.c:67:31: error:
查阅了一下,centOS上需要安装readline-devel ncurses-devel
yum install readline-devel ncurses-devel
[root@machine-1 lua-5.2.3]# make linux test
cd src && make linux
make[1]: Entering directory `/root/lua-5.2.3/src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[2]: Entering directory `/root/lua-5.2.3/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
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
make[2]: Leaving directory `/root/lua-5.2.3/src'
make[1]: Leaving directory `/root/lua-5.2.3/src'
src/lua -v
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio