【问题标题】:RPM dependenciesRPM 依赖项
【发布时间】:2020-01-03 16:51:48
【问题描述】:

我正在构建自己的 RPM,我想指定 node.js 包的特定版本作为依赖项。

我尝试了几种在 .spec 文件中指定它的方法,但这些方法都不起作用,我应该如何编写它?

我试过了:

BuildRequires: nodejs.x86_64 = 2:10.5.0-1nodesource

还有

BuildRequires: nodejs = 10.5.0

还有

BuildRequires: node = 10.5.0

构建 rpm 时出现以下错误:

错误:构建依赖项失败:nodejs.x86_64 = 2:10.5.0-1nodesource 需要...


我的构建机器是 Centos 7

【问题讨论】:

    标签: centos7 rpm specifications rpmbuild


    【解决方案1】:

    BuildRequires: nodejs = 2:10.5.0-1nodesource

    右侧需要完整版本,但在左侧指定 .x86_64 是第一次尝试的问题。

    您可能不应该指定拱门,但如果必须,通常可以这样做:

    BuildRequires: nodejs(x86-64) = 2:10.5.0-1nodesource

    【讨论】:

      【解决方案2】:

      应该是

        BuildRequires: nodejs = 2:10.5.0
      

      2:代表epoch,很少用到,但是这个包有设置。

      【讨论】:

      • 感谢您的输入,但使用BuildRequires: nodejs=2:10.5.0Requires: nodejs=2:10.5.0 时仍然出错
      猜你喜欢
      • 1970-01-01
      • 2010-10-26
      • 2013-10-05
      • 1970-01-01
      • 1970-01-01
      • 2014-12-25
      • 2012-03-20
      • 2019-12-30
      • 2021-05-01
      相关资源
      最近更新 更多