错误:readline/readline.h:没有那个文件或目录解决方法

本文记录了在编译Lua过程中遇到的关于readline库缺失的错误,并提供了通过安装readline-devel等依赖包来解决问题的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

make linux
在包含自 lua.h:16 的文件中,
从 lua.c:15:
luaconf.h:275:31: 错误:readline/readline.h:没有那个文件或目录
luaconf.h:276:30: 错误:readline/history.h:没有那个文件或目录
lua.c: In function ‘pushline’:
lua.c:182: 警告:隐式声明函数 ‘readline’
lua.c:182: 警告:赋值时将整数赋给指针,未作类型转换
lua.c: In function ‘loadline’:
lua.c:210: 警告:隐式声明函数 ‘add_history’
make[2]: *** [lua.o] 错误 1
make[2]: Leaving directory `/data0/software/lua-5.1.4/src’
make[1]: *** [linux] 错误 2
make[1]: Leaving directory `/data0/software/lua-5.1.4/src’
make: *** [linux] 错误 2

yum install libtermcap-devel ncurses-devel libevent-devel readline-devel

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值