首先,根据我自己搜索查到的有关于这个 ‘conflicts with file from package’错误的发生一般有两种情况。
第一种是在使用rpm安装的时候。网上有相关的解决方法:
https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-rpm-conflicting-files.html
To make RPM ignore this error, use the --replacefiles
option:
rpm -ivh --replacefiles foo-1.0-1.i386.rpm
就是在rpm -ivh 的命令后面加上 --replacefiles 这个参数。
第二种情况,是我自己遇到的,在yum 安装到时候。
错误:
'''
# yum install mysql
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.neu.edu.cn
* extras: centos.ustc.edu.cn
* updates: ftp.sjtu.edu.cn
http://downloads.paradigm4.com/centos6.3/14.12/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Package mysql is obsoleted by mysql-community-client, trying to install mysql-community-client-5.5.48-2.el6.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package MySQL-client.x86_64 0:5.5.48-1.linux2.6 will be obsoleted
---> Package mysql-community-client.x86_64 0:5.5.48-2.el6 will be obsoleting
--> Processing Dependency: mysql-community-libs(x86-64) = 5.5.48-2.el6 for package: mysql-community-client-5.5.48-2.el6.x86_64
--> Running transaction check
---> Package MySQL-shared.x86_64 0:5.5.48-1.el6 will be obsoleted
---> Package mysql-community-libs.x86_64 0:5.5.48-2.el6 will be obsoleting
--> Processing Dependency: mysql-community-common(x86-64) = 5.5.48-2.el6 for package: mysql-community-libs-5.5.48-2.el6.x86_64
---> Package mysql-libs.x86_64 0:5.1.73-5.el6_6 will be obsoleted
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-6.el6_5.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-6.el6_5.x86_64
--> Running transaction check
---> Package mysql-community-common.x86_64 0:5.5.48-2.el6 will be installed
---> Package mysql-community-libs-compat.x86_64 0:5.5.48-2.el6 will be obsoleting
---> Package postfix.x86_64 2:2.6.6-6.el6_5 will be updated
---> Package postfix.x86_64 2:2.6.6-6.el6_7.1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
mysql-community-client x86_64 5.5.48-2.el6 mysql55-community 14 M
replacing MySQL-client.x86_64 5.5.48-1.linux2.6
mysql-community-libs x86_64 5.5.48-2.el6 mysql55-community 1.7 M
replacing MySQL-shared.x86_64 5.5.48-1.el6
replacing mysql-libs.x86_64 5.1.73-5.el6_6
mysql-community-libs-compat x86_64 5.5.48-2.el6 mysql55-community 1.6 M
replacing mysql-libs.x86_64 5.1.73-5.el6_6
Installing for dependencies:
mysql-community-common x86_64 5.5.48-2.el6 mysql55-community 277 k
Updating for dependencies:
postfix x86_64 2:2.6.6-6.el6_7.1 updates 2.0 M
Transaction Summary
=============================================================================================================================
Install 4 Package(s)
Upgrade 1 Package(s)
Total size: 20 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Check Error:
file /usr/bin/mysql_config from install of mysql-community-client-5.5.48-2.el6.x86_64 conflicts with file from package MySQL-devel-5.5.48-1.el6.x86_64
Error Summary
-------------
'''
这是因为在之前的用rpm的安装包安装了一次,结果发现不行,然后换成修改yum的源的方法安装,出现了这样的错误。
解决方案:
#yum -y remove MySQL-devel-5.5.48-1.el6.x86_64
上面那个绿色的部分原封不动复制下来就OK。
这样就卸了那个发生冲突的部分了。
结果:
# yum -y remove MySQL-devel-5.5.48-1.el6.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package MySQL-devel.x86_64 0:5.5.48-1.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Removing:
MySQL-devel x86_64 5.5.48-1.el6 installed 20 M
Transaction Summary
=============================================================================================================================
Remove 1 Package(s)
Installed size: 20 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Erasing : MySQL-devel-5.5.48-1.el6.x86_64 1/1
Verifying : MySQL-devel-5.5.48-1.el6.x86_64 1/1
Removed:
MySQL-devel.x86_64 0:5.5.48-1.el6
Complete!
接下来安装就没有冲突了
相关推荐
离线安装包,测试可用
本文将详细探讨如何解决在CentOS 6.5上安装pdksh-5.2.14-36.el5.rpm时可能遇到的冲突,并提供一个有效的解决方案。 pdksh(Public Domain Korn Shell)是Korn Shell的一个开源实现,它是一种广泛使用的Unix shell,...
安装yum,必须按照顺序... file /usr/lib/python2.6/site-packages/yum/__init__.py from install of yum-3.2.29-40.el6.centos.noarch conflicts with file from package yum-3.2.27-14.el6.noarch ……其它输出略……
安装rabbitmq需要适配相应的erlang,由于下载速度慢,这里提供了centos7 64系统下可用的erlang23和rabbitmq3.8.3,安装方式:yum install xxxx.rpm即可。注意要优先安装erlang。
官方离线安装包,亲测可用
2023年5月26日,当前最新稳定版nginx 1.24.0 二进制rpm包 适用于arm64架构平台,centos7 redhat 7 arm架构的操作系统 已开启ipv6支持,官方默认不支持 可用于修复安全漏洞、升级更新nginx版本到1.24.0
在CentOS 7环境下,`lsof`是不可或缺的工具之一。本文将详细介绍`lsof`的安装过程,以及如何利用它来获取系统状态信息。 首先,`lsof-4.87-6.el7.x86_64.rpm`是针对CentOS 7系统的一个64位版本的`lsof`软件包。为了...
openssl rpm包 openssl-1.1.1o-1.el7.x86_64.rpm openssl-1.1.1o openssl
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装
RPM(Red Hat Package Manager)是用于Linux系统的软件包管理器,适用于Fedora、CentOS等基于RPM的系统。在Kylin V10这样的Ubuntu基础上的系统,通常使用的是DEB包,但可以通过RPM2DEB工具将RPM包转换为DEB格式进行...
file /usr/bin/docker-containerd from install of docker-ce-17.12.0.ce-1.el7.centos.x86_64 conflicts with file from package docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64 这些问题通常是因为新...