简体   繁体   English

从nodejs项目构建rpm包时缺少节点依赖性

[英]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. 我正在尝试从ubuntu 18.04上的nodejs项目构建rpm软件包,我正在使用speculate生成menlolab-runner.spec和systemd文件。 But when I run rpmbuild -bb ~/rpmbuild/SPECS/menlolab-runner.spec I get missing dependancy error: 但是当我运行rpmbuild -bb ~/rpmbuild/SPECS/menlolab-runner.spec我丢失了依赖错误:

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. 根据这一回答类似的问题,我需要补充右的deb-src的回购百胜名单,我不知道如何去这样做。 Here's my package.json if it's needed. 如果需要,这是我的package.json

I'm trying to build an rpm package from nodejs project on ubuntu 18.04 我正在尝试从Ubuntu 18.04上的nodejs项目构建rpm包

ubuntu is deb based, not rpm based, so building an rpm on a deb based system is bound to cause you trouble... ubuntu是基于deb的,而不是基于rpm的,因此在基于deb的系统上构建rpm必然会给您带来麻烦...

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). rpmbuild抱怨,因为他需要在您的系统上安装nodejs才能构建此spec文件(您会在spec文件中找到BuildRequires: nodejs )。

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. 尽管nodejs可能是由dpkg安装在您的系统上的,但rpm对此并不了解,因为rpm有其自己的数据库,用于存储有关所安装软件包的信息。

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. 您可以尝试使用--nodeps标志来告诉rpmbuild忽略您的构建依赖关系,但是我再次认为在基于deb的系统上构建rpm文件不是一个好主意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM