RPM 无法在 RHEL 上安装

RPM failing to install on RHEL

我正在尝试在 RHEL7 上安装 RPM 包。 我收到以下错误;

Fri Aug 30 05:36:55 UTC 2019--> Start Installing downloaded package...
    file /etc/rc.d from install of abc.x86_64 conflicts with file from package chkconfig-1.7.4-1.el7.x86_64
    file /etc/rc.d/init.d from install of abc.x86_64 conflicts with file from package chkconfig-1.7.4-1.el7.x86_64
    file /etc/rc.d from install of abc.x86_64 conflicts with file from package initscripts-9.49.47-1.el7.x86_64
    file /etc/rc.d/init.d from install of abc.x86_64 conflicts with file from package initscripts-9.49.47-1.el7.x86_64
    file /usr/lib/systemd/system from install of abc.x86_64 conflicts with file from package systemd-219-67.el7_7.1.x86_64
    file /usr/lib/systemd from install of abc.x86_64 conflicts with file from package systemd-219-67.el7_7.1.x86_64

这个错误到底是什么意思? 这是否意味着 RPM abc 不允许对 /etc/rc.d 进行任何更改或 chkconfig-1.7.4-1.el7.x86_64 是一个冲突包?

两个rpm包不能提供相同的文件或目录。因此:

不要

这会递归地打包 /etc/rc.d 目录和内容。

%files
/etc/rc.d

DO

只打包真正属于您的包的文件。

%files
/etc/rc.d/init.d/*