Linux 禁用 yum 事务检查文件冲突
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21246680/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Disable yum transaction check for file conflict
提问by Chucks
How do I disable yum transaction check for a file ?
如何禁用文件的 yum 事务检查?
Transaction check error:
file /usr/local/xenco/backend/current from install of xenco-rr-1.9.6-104.x86_64 conflicts with file from package xenco-server-1.9.6-104.x86_64
采纳答案by Sami Laine
Replacing files from another RPM package is bad idea in most cases and I strongly advise against what you're trying to do. That said, apply following at your own risk.
在大多数情况下,从另一个 RPM 包替换文件是个坏主意,我强烈建议您不要这样做。也就是说,请自行承担风险。
Yum does not provide an option to install conflicting files, I think. However, that does not prevent you from installing a RPM package with rpm(1) which doesprovide an option to override existing files from another package, namely --replacefiles
.
我认为 Yum 没有提供安装冲突文件的选项。但是,这并不妨碍您使用 rpm(1) 安装 RPM 软件包,它提供了一个选项来覆盖另一个软件包中的现有文件,即--replacefiles
.
So, first get the RPM of the package you want to install on a local filesystem (/usr/local/xenco...
makes me suspect that is the case already). Next install the RPM with rpm -i --replacefiles <your_rpm_file>
.
因此,首先获取要安装在本地文件系统上的软件包的 RPM(/usr/local/xenco...
让我怀疑已经是这种情况)。接下来安装 RPM rpm -i --replacefiles <your_rpm_file>
。
回答by Muthukumar Anbalagan
This method worked for me, when I faced similar issue
当我遇到类似问题时,这种方法对我有用
Simply get the existing package with below command
只需使用以下命令获取现有包
rpm -qa | grep xenco
Remove those conflicting package with
删除那些冲突的包
yum remove packageNameFromTheList
回答by Prajwal
what i always do is remove the package that is on the right hand side. In your case it would be -
我总是做的是删除右侧的包。在你的情况下,它会是 -
yum remove xenco-server-1.9.6-104.x86_64
yum remove <> can work with any package error, i have encountered many such transactions errors when working on vm on cloud, i always remove the package that causes conflicts and always has worked for me.
yum remove <> 可以处理任何包错误,我在云上的 vm 上工作时遇到过很多这样的事务错误,我总是删除导致冲突的包,并且总是对我有用。