Yury Stanev
Yury Stanev

Reputation: 509

missing node dependency when building an rpm package from nodejs project

I'm trying to build an rpm package from nodejs project on ubuntu 18.04, I'm using speculate to generate menlolab-runner.spec and systemd files. But when I run rpmbuild -bb ~/rpmbuild/SPECS/menlolab-runner.spec I get missing dependancy error:

error: Failed build dependencies:
        nodejs is needed by menlolab-runner-0.1.4-1.x86_64

According to this answer to similar question, I need to add right deb-src repos to yum list, I don't know how to go about doing that. Here's my package.json if it's needed.

Upvotes: 0

Views: 808

Answers (1)

Chris Maes
Chris Maes

Reputation: 37792

I'm trying to build an rpm package from nodejs project on ubuntu 18.04

ubuntu is deb based, not rpm based, so building an rpm on a deb based system is bound to cause you trouble...

rpmbuild is complaining because he needs nodejs to be installed on your system to allow building this spec file (you will find BuildRequires: nodejs in your spec file).

Although nodejs is probably installed on your system by dpkg, rpm does not know about it because rpm has its own database where it stores the information of what package is installed.

You could try using the --nodeps flag to tell rpmbuild to ignore your build dependencies, but again I don't think it to be a good idea to build rpm files on a deb-based system.

Upvotes: 2

Related Questions