【gpdb编译报错】confiqure error readline library not found

confiqure: error: readline library not found

快捷导航

在解决问题之前,您可以通过下面的导航快速找到相关资源,助您一臂之力!💡👇

快捷导航链接地址备注
🌟 相关文档-
📚 Ambari+Bigtop自定义组件集成点击查看CSDN地址
📖 Ambari+Bigtop所有手册目录点击查看Gitee
🚀 编译、开发、部署、集成解决方案点击查看知识星球
💻 源代码-
Ambari-env点击查看GitHub
Ambari-env点击查看Gitee
Ambari-2.8.0魔改版点击查看Gitee
💾 编译包-
☁️ 蓝奏云-1.0.2点击下载
🔐 阿里云盘-1.0.2点击下载提取码:01no
📞 联系方式-
📬 QQ:1群加入我们

正题:如何解决 flex is missing on your system 错误问题 🤔

1️⃣ 错误分析

下述完整报错日志:

13:45:29.875 [QUIET] [system.out] configure: checking build system type... x86_64-unknown-linux-gnu
13:45:29.880 [QUIET] [system.out] configure: checking host system type... x86_64-unknown-linux-gnu
13:45:29.888 [QUIET] [system.out] configure: checking for gcc... gcc
13:45:29.895 [QUIET] [system.out] checking whether the C compiler works... yes
13:45:29.902 [QUIET] [system.out] checking for C compiler default output file name... a.out
13:45:29.908 [QUIET] [system.out] checking whether the C compiler works... yes
13:45:29.914 [QUIET] [system.out] checking whether we are cross compiling... no
13:45:29.920 [QUIET] [system.out] checking for suffix of executables... 
13:45:29.926 [QUIET] [system.out] checking for suffix of object files... o
13:45:29.931 [QUIET] [system.out] checking whether we are using the GNU C compiler... yes
13:45:29.937 [QUIET] [system.out] checking whether gcc accepts -g... yes
13:45:29.943 [QUIET] [system.out] checking for gcc option to accept ISO C89... none needed
13:45:29.949 [QUIET] [system.out] checking whether gcc understands -c and -o together... yes
13:45:30.012 [QUIET] [system.out] checking for library containing crypt... -lcrypt
13:45:30.122 [QUIET] [system.out] checking for library containing fdatasync... none required
13:45:30.175 [QUIET] [system.out] checking for library containing gethostbyname_r... none required
13:45:30.227 [QUIET] [system.out] checking for library containing shmget... none required
13:45:30.280 [QUIET] [system.out] checking for -ledit... no
13:45:30.453 [QUIET] [system.out] checking for -lreadline... no
13:45:30.621 [ERROR] [system.err] configure: error: readline library not found
13:45:30.621 [ERROR] [system.err] If you have readline already installed, see config.log for details on the failure. It is possible the compiler isn't looking in the proper directory.
13:45:30.621 [ERROR] [system.err] Use --without-readline to disable readline support.
13:45:30.654 [ERROR] [system.err] error: Bad exit status from /var/tmp/rpm-tmp.W8Zd4P (%build)
13:45:30.654 [QUIET] [system.out] 
13:45:30.654 [QUIET] [system.out] RPM build errors:
13:45:30.654 [ERROR] [system.err]     Bad exit status from /var/tmp/rpm-tmp.W8Zd4P (%build)
13:45:30.655 [DEBUG] [system.out] Additional debugging information can be found in /var/log/build.log
13:45:30.656 [DEBUG] [system.out] Configure failed: missing dependencies or incorrect configuration.
13:45:30.657 [DEBUG] [system.out] Please check your installation and try again.

关键日志:

configure: error: readline library not found
If you have readline already installed, see config.log for details on the failure. 
Use --without-readline to disable readline support.

这意味着编译过程无法找到 readline 库,而 readline 库通常用于提供命令行编辑和历史记录功能。为了帮您解决这个问题,以下是详细的错误分析和解决方案。

🔍 错误分析

从日志中可以看出,编译过程正在查找 readline 库,但未能找到。通常这种情况可能是因为 readline 未安装,或者编译器未能找到正确的路径。你可以选择安装 readline 库或禁用 readline 支持。

2️⃣ 解决方案 💡

以下是两种解决此问题的方案:

方案 1:安装 readline
  1. 对于基于 Debian 的系统 (如 Ubuntu)

    你可以通过以下命令安装 readline 开发库:

    sudo apt-get update
    sudo apt-get install libreadline-dev
    
  2. 对于基于 RPM 的系统 (如 CentOS 或 Fedora)

    你可以通过以下命令安装 readline 开发库:

    sudo yum install readline-devel
    

    安装完成后,重新运行 configure 和编译命令。

方案 2:禁用 readline 支持

如果你不需要 readline 库的支持,也可以通过以下方式跳过它:

  1. 在运行 configure 脚本时,添加 --without-readline 参数:

    ./configure --without-readline
    

    这样可以跳过 readline 库的检查,继续编译过程。

3️⃣ 我的解决方案(懒人办法)💡🚀

如果你希望更快速地解决所有编译问题,不妨试试 ambari-env!这个一键解决方案不仅能帮你轻松安装所需工具,还能配置好所有环境依赖,让你专注于项目开发,而无需担心繁琐的环境配置。

我们的初始化脚本会覆盖从编译到安装的所有依赖,真正实现轻松上手,无忧无虑!!

在这里插入图片描述

⬇️⬇️⬇️查看全部内容⬇️⬇️⬇️


更多详细内容请关注我们的微信公众号:发送"文章"关键字获取

或加入QQ1群,了解版本动向,解答大数据问题。


⬆️⬆️⬆️查看全部内容⬆️⬆️⬆️

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值