Reputation: 23515
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
Upvotes: 0
Views: 458
Reputation: 799
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
Upvotes: 3
Reputation: 5427
It should be
BuildRequires: nodejs = 2:10.5.0
The 2: stands for epoch, which is rarely used, but this package has it set.
Upvotes: 1