Solve conflicts with file from error under CentOS.

First of all, according to what I found in my own search, there are generally two situations about the occurrence of this 'conflicts with file from package' error.

The first is when installing using rpm. There are related solutions online :

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

Just add the --replacefiles parameter after the rpm -ivh command.

 

The second situation, which I encountered myself, was when yum was installed.

mistake:

'''

# 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

-------------

'''

This is because the rpm installation package was installed once before, but it was found that it was not working, and then it was installed by modifying the source of yum, and such an error occurred.

 

 

solution:

 #yum -y remove MySQL-devel-5.5.48-1.el6.x86_64


The green part above is copied as it is and it is OK.

This removes the conflicting part.

 

result:

# 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!

 

There will be no conflicts in the next installation

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327068879&siteId=291194637
Recommended