简体   繁体   English

安装本地 rpm 的事务检查错误

[英]Transaction check error installing local rpms

I try to install two springBoot module with rpm, this is the error I get:我尝试使用 rpm 安装两个 springBoot 模块,这是我得到的错误:

  file /path/config/application.yaml from install of master-2.0.0-SNAPSHOT.noarch conflicts with file from package worker-2.0.0-SNAPSHOT.noarch
  file /path/config/log4j2.xml from install of master-2.0.0-SNAPSHOT.noarch conflicts with file from package worker-2.0.0-SNAPSHOT.noarch

Can somebody explain why this is a problem and what to do.有人可以解释为什么这是一个问题以及该怎么做。

Problem is that both packages master-2.0.0-SNAPSHOT and worker-2.0.0-SNAPSHOT try to deploy same file ( application.yaml and log4j2.xml ) into same directory ( /path/config ).问题是两个包master-2.0.0-SNAPSHOTworker-2.0.0-SNAPSHOT都尝试将相同的文件( application.yamllog4j2.xml )部署到同一目录( /path/config )。

In RPM (and possibly any other packaging system) no package can overwrite a file owned by other package.在 RPM(以及可能的任何其他打包系统)中,没有 package 可以覆盖其他 package 拥有的文件。

To resolve the problem you can:要解决此问题,您可以:

  • add component name to the deployment path (say /path/master/config or /path/worker/config ) so that each component has it's own set of deployed files.将组件名称添加到部署路径(例如/path/master/config/path/worker/config ),以便每个组件都有自己的一组部署文件。
  • if you intend to share configuration between components and have them both use same config file, factor the configuration into a third package (eg config-2.0.0-SNAPSHOT )如果您打算在组件之间共享配置并让它们都使用相同的配置文件,请将配置分解为第三个 package(例如config-2.0.0-SNAPSHOT

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

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