TT Bigdata TT Bigdata
首页
GitHub (opens new window)
JaneTTR

JaneTTR

数据酿造智慧,每一滴都是沉淀!
  • 报错解决

    • Ambari 报错
    • Bigtop 报错
      • Hadoop

      • Spark

      • Trino

      • Hudi

      • Paimon

      • Livy

      • Flink

      • Atlas

      • Superset

      • Jsvc

      • Zookeeper

        • ZooKeeper 构建(缺少 hostname 命令)
        • cppunit-devel 依赖缺失解决方案
          • 背景说明
          • 0. 全部日志
          • 1. 报错及常见卡点
          • 2. 关键解决方案——引入阿里云 epel 镜像
            • 2.1 一键配置阿里云 EPEL 源
          • 3. 重新编译验证
      • Hive

      • Sqoop

      • Cloudbeaver

      • Bigtop-select

      • Knox

      • Hue

  • 系统适配

  • 监控与调优

  • BUG临时处理
  • 实验室

  • 运维资料
  • 报错解决
  • Bigtop 报错
  • Zookeeper
JaneTTR
2025-06-06
目录
背景说明
0. 全部日志
1. 报错及常见卡点
2. 关键解决方案——引入阿里云 epel 镜像
2.1 一键配置阿里云 EPEL 源
3. 重新编译验证

cppunit-devel 依赖缺失解决方案

# 背景说明

在 Rocky Linux 8.10 上用 Bigtop 编译 Zookeeper rpm 包时,经常因为系统找不到 cppunit-devel,导致 rpmbuild 阶段直接中断。

# 0. 全部日志

Provides: bigtop-select = 3.2.0-1.el8
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /usr/bin/ambari-python-wrap /usr/bin/python2
Checking for unpackaged file(s): /usr/lib/rpm/check-files /opt/modules/bigtop/build/bigtop-select/rpm/BUILDROOT/bigtop-select-3.2.0-1.el8.x86_64
Wrote: /opt/modules/bigtop/build/bigtop-select/rpm/RPMS/noarch/bigtop-select-3.2.0-1.el8.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.lE4Uio
+ umask 022
+ cd /opt/modules/bigtop/build/bigtop-select/rpm//BUILD
+ cd bigtop-select-3.2.0
+ rm -rf /opt/modules/bigtop/build/bigtop-select/rpm/BUILDROOT/bigtop-select-3.2.0-1.el8.x86_64
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.HdTvOr
+ umask 022
+ cd /opt/modules/bigtop/build/bigtop-select/rpm//BUILD
+ rm -rf bigtop-select-3.2.0
+ exit 0
Download https://mirrors.huaweicloud.com/apache//zookeeper/zookeeper-3.5.9/apache-zookeeper-3.5.9.tar.gz

> Task :zookeeper-tar
Copy /opt/modules/bigtop/dl/apache-zookeeper-3.5.9.tar.gz to /opt/modules/bigtop/build/zookeeper/tar/apache-zookeeper-3.5.9.tar.gz

> Task :zookeeper-srpm
Copying common RPM SOURCES from: /opt/modules/bigtop/bigtop-packages/src/common/zookeeper (excluding 3.5.9) to /opt/modules/bigtop/build/zookeeper/rpm/SOURCES
No version-specific directory found at: /opt/modules/bigtop/bigtop-packages/src/common/zookeeper/3.5.9
Wrote: /opt/modules/bigtop/build/zookeeper/rpm/SRPMS/zookeeper_3_2_0-3.5.9-2.el8.src.rpm

> Task :zookeeper-rpm FAILED
error: Failed build dependencies:
        cppunit-devel is needed by zookeeper_3_2_0-3.5.9-2.el8.x86_64
Installing /opt/modules/bigtop/output/zookeeper/zookeeper_3_2_0-3.5.9-2.el8.src.rpm

FAILURE: Build failed with an exception.

* Where:
Script '/opt/modules/bigtop/packages.gradle' line: 545

* What went wrong:
Execution failed for task ':zookeeper-rpm'.
> Process 'command 'rpmbuild'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
25 actionable tasks: 25 executed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

# 1. 报错及常见卡点

编译时报如下错误:

> Task :zookeeper-rpm FAILED
error: Failed build dependencies:
        cppunit-devel is needed by zookeeper_3_2_0-3.5.9-2.el8.x86_64
1
2
3

警告

大部分云服务器默认的 Rocky/CentOS 官方仓库 没有 cppunit-devel 包,dnf/yum 直接安装会提示“没有可用软件包”!


# 2. 关键解决方案——引入阿里云 epel 镜像重点操作

如图所示,通过引入阿里云 EPEL 镜像源,系统才能正常获取并安装 cppunit-devel:

镜像源配置效果

# 2.1 一键配置阿里云 EPEL 源

当你发现 cppunit-devel 装不上,优先考虑更换国内 EPEL 镜像。最常用的是阿里云,操作如下:

# 先安装 epel-release(如果没装过)
dnf install -y epel-release

# 替换为阿里云 EPEL 镜像
sed -i 's|^metalink=|#metalink=|g' /etc/yum.repos.d/epel.repo
sed -i 's|^#baseurl=.*|baseurl=https://mirrors.aliyun.com/epel/$releasever/Everything/$basearch/|' /etc/yum.repos.d/epel.repo

# 更新缓存
dnf makecache
1
2
3
4
5
6
7
8
9

提示

以上脚本适用于 Rocky/CentOS 8.x,极大提升 epel 依赖包(如 cppunit-devel)的获取速度和稳定性。

配置 epel 源后,即可直接安装:

dnf install -y cppunit-devel
1

依赖安装成功效果如下:

依赖安装效果


# 3. 重新编译验证

镜像引入并安装成功后,重新运行:

gradle zookeeper-rpm \
  -PparentDir=/usr/bigtop -Dbuildwithdeps=true -PpkgSuffix
1
2

编译即可顺利通过,见下图:

编译成功效果

#ZooKeeper#Bigtop#错误排查#RPM#Rocky Linux
ZooKeeper 构建(缺少 hostname 命令)
org.apache.logging.slf4j.Log4j.Marker is not public 解决方案

← ZooKeeper 构建(缺少 hostname 命令) org.apache.logging.slf4j.Log4j.Marker is not public 解决方案→

最近更新
01
当前版本 2026/08
08-29
02
把 Ambari Server HA 稳稳地跑起来
08-17
03
从一次启用操作追到主备就绪
08-17
更多文章>
Theme by Vdoing | Copyright © 2017-2026 JaneTTR | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式