转自:
make linux
cd src && make linuxmake[1]: Entering directory `/root/lua/lua-5.3.2/src'make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"make[2]: Entering directory `/root/lua/lua-5.3.2/src'gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.clua.c:80:31: fatal error: readline/readline.h: No such file or directory #include <readline/readline.h> ^compilation terminated.make[2]: *** [lua.o] Error 1make[2]: Leaving directory `/root/lua/lua-5.3.2/src'make[1]: *** [linux] Error 2make[1]: Leaving directory `/root/lua/lua-5.3.2/src'make: *** [linux] Error 2解决方法:
缺少libreadline-dev依赖包centos: yum install readline-develdebian: apt-get install libreadline-dev.http://www.vcerror.com/?p=1786
# make linuxcd src && make linuxmake[1]: Entering directory `/home/lua/lua-5.3.2/src'make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"make[2]: Entering directory `/home/lua/lua-5.3.2/src'gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.cgcc -std=gnu99 -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o luac.o luac.cgcc -std=gnu99 -o luac luac.o liblua.a -lm -Wl,-E -ldl -lreadline make[2]: Leaving directory `/home/lua/lua-5.3.2/src'make[1]: Leaving directory `/home/lua/lua-5.3.2/src'