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

JaneTTR

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

    • Ambari 报错
    • Bigtop 报错
      • Hadoop

      • Spark

      • Trino

      • Hudi

      • Paimon

      • Livy

      • Flink

      • Atlas

      • Superset

      • Jsvc

        • jsvc 依赖缺失导致 rpm 构建失败
          • 编译背景
          • 1. 编译命令与场景
          • 2. 报错现象与日志定位
          • 3. 问题原因分析
          • 4. 解决办法
      • Zookeeper

      • Hive

      • Sqoop

      • Cloudbeaver

      • Bigtop-select

      • Knox

      • Hue

  • 系统适配

  • 监控与调优

  • BUG临时处理
  • 实验室

  • 运维资料
  • 报错解决
  • Bigtop 报错
  • Jsvc
JaneTTR
2025-06-06
目录
编译背景
1. 编译命令与场景
2. 报错现象与日志定位
3. 问题原因分析
4. 解决办法

jsvc 依赖缺失导致 rpm 构建失败

# 编译背景

在 Ambari + Bigtop 集成环境下,jsvc 是分布式服务运行常见的守护进程组件,需编译为 rpm 包分发部署。本次实际操作基于 Rocky Linux 8.x 环境,执行 jsvc 编译任务。

# 1. 编译命令与场景

本次执行的构建脚本如下:

gradle bigtop-groovy-rpm \
bigtop-jsvc-rpm \
bigtop-select-rpm \
bigtop-utils-rpm \
-PparentDir=/usr/bigtop -Dbuildwithdeps=true -PpkgSuffix
1
2
3
4
5

# 2. 报错现象与日志定位

在编译 bigtop-jsvc-rpm 阶段,控制台输出如下报错:

error: Failed build dependencies:
      autoconf is needed by bigtop-jsvc-1.2.4-1.el8.x86_64
      automake is needed by bigtop-jsvc-1.2.4-1.el8.x86_64
      gcc is needed by bigtop-jsvc-1.2.4-1.el8.x86_64
1
2
3
4

警告

本质为 rpmbuild 编译依赖缺失,常见于初次部署/最小化系统环境。

详细 debug 日志如下(节选):

03:22:53.806 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Environment for process 'command 'rpmbuild'': {PATH=/opt/modules/apache-maven-3.8.4/bin:/usr/local/sbin:/usr/local/bin:
/usr/sbin:/usr/bin:/sbin:/bin:/opt/modules/gradle-5.6.4/bin:/opt/modules/apache-ant-1.10.12/bin:/opt/modules/apache-ivy-2.5.0/bin:/opt/modules/jdk1.8.0_202/bin, HISTCONTROL=ignoredups, LES
SOPEN=||/usr/bin/lesspipe.sh %s, HISTSIZE=1000, JAVA_HOME=/opt/modules/jdk1.8.0_202, OLDPWD=/opt/modules/gradle-5.6.4, TERM=xterm, USER=root, LANG=C.UTF-8, GRADLE_HOME=/opt/modules/gradle-
5.6.4, ANT_HOME=/opt/modules/apache-ant-1.10.12, MAVEN_HOME=/opt/modules/apache-maven-3.8.4, HOSTNAME=rocky8, MAIL=/var/spool/mail/root, DEBUGINFOD_URLS=https://debuginfod.centos.org/ , LO
GNAME=root, IVY_HOME=/opt/modules/apache-ivy-2.5.0, PWD=/opt/modules/bigtop, QA_RPATHS=2, HOME=/root, SHLVL=1}
03:22:53.806 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
03:22:53.806 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command 'rpmbuild'.
03:22:53.813 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
03:22:53.813 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command 'rpmbuild''
03:22:53.813 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
03:22:53.829 [ERROR] [system.err] error: Failed build dependencies:
03:22:53.829 [ERROR] [system.err]       autoconf is needed by bigtop-jsvc-1.2.4-1.el8.x86_64
03:22:53.829 [ERROR] [system.err]       automake is needed by bigtop-jsvc-1.2.4-1.el8.x86_64
03:22:53.829 [ERROR] [system.err]       gcc is needed by bigtop-jsvc-1.2.4-1.el8.x86_64
03:22:53.831 [QUIET] [system.out] Installing /opt/modules/bigtop/output/bigtop-jsvc/bigtop-jsvc-1.2.4-1.el8.src.rpm
03:22:53.831 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
03:22:53.832 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'rpmbuild'' finished with exit value 1 (state: FAILED)
03:22:53.832 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute doLast {} action for :bigtop-jsvc-rpm'
03:22:53.832 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :bigtop-jsvc-rpm' completed
03:22:53.832 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter] Removed task artifact state for {} from context.
03:22:53.832 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :bigtop-jsvc-rpm'
03:22:53.832 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :bigtop-jsvc-rpm' comp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# 3. 问题原因分析核心根因

  • jsvc 依赖 C 代码编译,需用 gcc/autoconf/automake 生成可用二进制;
  • rpmbuild 默认会校验 spec 文件里定义的 BuildRequires 字段,遇到依赖未安装即中断流程;
  • Rocky/CentOS 最小系统安装/云镜像,常常没有这些基础开发工具,导致首次编译失败。

提示

遇到“Failed build dependencies”报错,优先按缺啥补啥,把 rpm 报的所有依赖装全。

# 4. 解决办法

一行命令补齐所有开发依赖:

dnf install -y autoconf automake gcc
1

你也可以扩展为批量安装更多 rpm 通用开发依赖(比如 make libtool),但上面三项是 bigtop-jsvc 必需项。

编译成功效果图

#Bigtop#错误排查#Ambari#RPM
urllib3 v2 only supports OpenSSL 1.1.1+
ZooKeeper 构建(缺少 hostname 命令)

← urllib3 v2 only supports OpenSSL 1.1.1+ ZooKeeper 构建(缺少 hostname 命令)→

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