Lua安装报错:编译 Lua 报错:error: readline/readline.h: No such file or directory 问题解决办法
Lua安装报错:编译 Lua 报错:error: readline/readline.h: No such file or directory 问题解决办法
root@wan:/wan/lua/lua-5.3.5# make linux test cd src && make linux make[1]: 进入目录“/wan/lua/lua-5.3.5/src” make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" make[2]: 进入目录“/wan/lua/lua-5.3.5/src” gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.c lua.c:82:10: fatal error: readline/readline.h: 没有那个文件或目录 #include <readline/readline.h> ^~~~~~~~~~~~~~~~~~~~~ compilation terminated.
上述问题是缺少 readline相关的库,具体的解决方法,在Ubuntu下
apt-get install libreadline-dev