Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
257 views
in Technique[技术] by (71.8m points)

linux - Transaction check error installing local rpms

I try to install two springBoot module with rpm, this is the error I get:

  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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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).

In RPM (and possibly any other packaging system) no package can overwrite a file owned by other 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.
  • if you intend to share configuration between components and have them both use same config file, factor the configuration into a third package (e.g. config-2.0.0-SNAPSHOT)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...