- 问题描述:
编译安装lua 出现以下错误
lua.c:82:10: fatal error: readline/readline.h: 没有那个文件或目录
#include <readline/readline.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
...
- 解决方法:
据度娘说是因为缺少 libreadline-dev
依赖包的原因,安装便是:
> sudo apt-get install libreadline-dev
- 再次编译
cd src && make linux
make[1]: 进入目录“/home/h2o2/Downloads/lua-5.3.5/src”
make all SYSCFLAGS="-DLUA_USE_LINUX"
...
make[1]: 离开目录“/home/h2o2/Downloads/lua-5.3.5/src”
src/lua -v
Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio
- 安装
> sudo make install
...
> lua -v
Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio