首先,根据我自己搜索查到的有关于这个 ‘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-vault-8.5.2111.repo
centos-release-7-6.1810.2.el7.centos.x86_64.rpm包 命令主要是针对将 centos7.9版本降级到centos7.6,其他版本也可以参考降底版本到7.6,包含操作命令
离线安装包,测试可用
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装
ntp-4.2.6p5-25.el7.centos.2.x86_64.rpm,ntp-4.2.6p5-25.el7.centos.2.x86_64.rpm
ntpdate-4.2.6p5-29.el7.centos.2.x86_64
Centos7 el7.x86_64 官方离线安装包,安装指令为 sudo rpm -ivh httpd-tools-2.4.6-99.el7.centos.1.x86_64.rpm
在给定的标题和描述中,提到了三个关键的动态链接库文件:`libcrypto.so.6`、`libexpat.so.0`和`libssl.so.6`,这些都是在CentOS 7环境下运行的软件可能会依赖的关键组件。 1. **libcrypto.so.6**: 这个文件是...
Centos7 el7.x86_64 官方离线安装包,安装指令为 sudo rpm -ivh httpd-2.4.6-99.el7.centos.1.x86_64.rpm
离线安装包,亲测可用
ntp-4.2.6p5-29.el7.centos.2.x86_64
centos-7.0-x86_64.box 是Vagrant的box 国外下载很慢,方便同学们下载
kernel-plus-headers-3.10.0-1160.41.1.el7.centos.plus.x86_64.rpm
Centos-6-Vault-Aliyun.repo
centos-indexhtml-6-1.el6.centos.noarch.rpm是centos工具包。
win10安装centos7时所需的Docker镜像包,有些朋友的网络不好,下载太慢,这里提供一下,方便朋友们。详情百度搜教程
httpd-2.2.15-60.el6.centos.6.x86_64.rpm httpd-2.2.15-60.el6.centos.6.x86_64.rpm
离线安装包,亲测可用
codeblock
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装