skip to Main Content

I’m building my own RPM and I want to specify a specific version of the node.js package as dependency.

I’ve tried several way to specify it in the .spec file but none of theses works, how should I write it ?

I have tried :

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

also

BuildRequires: nodejs = 10.5.0

also

BuildRequires: node = 10.5.0

Get the following error building the rpm :

error: Failed build dependencies: nodejs.x86_64 =
2:10.5.0-1nodesource is needed by …


My building machine is a Centos 7

enter image description here

2

Answers


  1. It should be

      BuildRequires: nodejs = 2:10.5.0
    

    The 2: stands for epoch, which is rarely used, but this package has it set.

    Login or Signup to reply.
  2. BuildRequires: nodejs = 2:10.5.0-1nodesource

    The full version in necessary on the right-hand-side, but specifying .x86_64 on the left-hand-side was the problem with the first attempt.

    You should probably not be specifying the arch, but if you must, it can generally be done like this:

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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search