首页 > 解决方案 > 如何在打包 RPM 时添加要安装的必备包与 RPM 安装

问题描述

我正在创建一个依赖于 nss 工具的 RPM 包(ex test.RPM)。因为我的 test.RPM 应用程序将 CA 证书添加到 Chromum\firefox 浏览器以信任我的自签名证书。所以我添加了

yum install nss-tools in the %prep section of the spec file. 

在安装 test.RPM(yum install test.rpm) 时会引发错误

Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum

我知道原因,yum 已经被测试包锁定了。

任何人都可以建议如何在打包 RPM 时添加要与 RPM 安装一起安装的先决条件包。

标签: centosrpmpacking

解决方案


Requires: nss-tool

有关详细信息,请参阅http://ftp.rpm.org/api/4.4.2.2/dependencies.html


推荐阅读