Bug #70837 File conflict when upgrading to 5.6 community
Submitted: 6 Nov 2013 16:08 Modified: 8 Aug 2016 11:49
Reporter: Rick Stevents Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Package Repos Severity:S3 (Non-critical)
Version:5.6.14-3.el6.x86_64 OS:Linux (CentOS 6.4)
Assigned to: Terje Røsten CPU Architecture:Any
Tags: compat, conflicts with file from package, MySQL, mysql-community

[6 Nov 2013 16:08] Rick Stevents
Description:
I'm running CentOS 6.4 with default MySQL (5.1.69-1). In an effort to get to the latest available MySQL version, I upgraded to MySQL 5.5.34-1 via the Remi repo first:

yum --enablerepo=remi install mysql mysql-server

After performing the mysql_upgrade to ensure success, I went to install mysql-community:

yum localinstall mysql-community-release-el6-3.noarch.rpm

From there I attempted to install the latest mysql release:

yum -v --disablerepo=remi --enablerepo=mysql-community install mysql-community-client.x86_64 mysql-community-common.x86_64 mysql-community-libs.x86_64 mysql-community-libs-compat.x86_64 mysql-community-server.x86_64 mysql-workbench-community.x86_64

I receive the following error:

Transaction Check Error:
  file /usr/lib64/mysql/libmysqlclient.so.16.0.0 from install of mysql-community-libs-compat-5.6.14-3.el6.x86_64 conflicts with file from package compat-mysql51-5.1.54-1.el6.remi.x86_64
  file /usr/lib64/mysql/libmysqlclient_r.so.16.0.0 from install of mysql-community-libs-compat-5.6.14-3.el6.x86_64 conflicts with file from package compat-mysql51-5.1.54-1.el6.remi.x86_64

If I remove mysql-community-libs-compat.x86_64 from the above statement, the install is a success. If I attempt to remove compat-mysql51-5.1.54-1.el6.remi.x86_64 via the yum package manager it wants to remove 17 other packages (which I'd prefer not to do):

yum erase compat-mysql51-5.1.54-1.el6.remi.x86_64

Removing:
compat-mysql51
Removing for dependencies:
MySQL-python
cronie
cronie-anacron
crontabs
dovecot-mysql
mod_auth_mysql
mysql-connector-odbc
mysql-workbench-community
perl-DBD-MySQL
postfix
redhat-lsb
redhat-lsb-compat
redhat-lsb-core
redhat-lsb-graphics
redhat-lsb-printing
sysstat
webalizer

rpm -q -a | grep -i mysql
mysql-community-release-el6-3.noarch
mysql-community-client-5.6.14-3.el6.x86_64
dovecot-mysql-2.0.9-5.el6.x86_64
mod_auth_mysql-3.0.0-11.el6_0.1.x86_64
mysql-workbench-community-6.0.7-4.el6.x86_64
mysql-community-common-5.6.14-3.el6.x86_64
mysql-community-devel-5.6.14-3.el6.x86_64
perl-DBD-MySQL-4.013-3.el6.x86_64
MySQL-python-1.2.3-0.3.c1.1.el6.x86_64
mysql-community-server-5.6.14-3.el6.x86_64
mysql-connector-odbc-5.1.5r1144-7.el6.x86_64
compat-mysql51-5.1.54-1.el6.remi.x86_64
mysql-community-libs-5.6.14-3.el6.x86_64

How to repeat:
1.) Base install of Centos 6.4 or just have MySQl version 5.1.69-1 installed.
2.) Upgrade to MySQL 5.5.34-1 via the Remi repo. 
3.) Upgrade to latest mysql-community version via yum:
yum -v --disablerepo=remi --enablerepo=mysql-community install mysql-community-client.x86_64 mysql-community-common.x86_64 mysql-community-libs.x86_64 mysql-community-libs-compat.x86_64 mysql-community-server.x86_64 mysql-workbench-community.x86_64
[6 Nov 2013 16:31] Rick Stevents
I manually downloaded and installed:

MySQL-shared-compat-5.6.14-1.el6.x86_64.rpm

From there I was able to remove:

compat-mysql51-5.1.54-1.el6.remi.x86_64

Which then permitted me to install:

mysql-community-libs-compat.x86_64 0:5.6.14-3.el6
[6 Nov 2013 19:13] Terje Røsten
Thanks for using MySQL Yum Repository!

Repository is designed to upgrade stock OS rpms, by going via remi repo you might get into trouble. 

Of course that means the transition from MySQL 5.1 (from OS) to MySQL 5.6 is becoming difficult if you have 5.1 data files.

Could you please try the following steps:

 - disable MySQL Yum Repository
 - remove MySQL related packages from remi repo (or other repos)
 - install MySQL 5.5 rpm packages from ULN available here:
     http://public-yum.oracle.com/repo/OracleLinux/OL6/MySQL/x86_64/
 - enable MySQL Yum Repository
 - run 'yum update'

In short: try to go via ULN MySQL 5.5 packages instead of remi repo.
[13 Nov 2013 15:11] MySQL Verification Team
Please check what asked by Terje Røsten . Thanks.
[14 Dec 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[17 Feb 2014 22:09] Nick Harrison
Is Oracle/MySQL prepared to begin supporting/packaging/distributing a crontabs package that works with its mysql-community-libs package? 

Yum removes crontabs and other packages by default when we are forced to remove mysql-libs to make way for mysql-community-libs. When attempting to reinstall crontabs, Yum tries to reinstall mysql-libs, which fails and states a conflict with the files provided by mysql-community-libs.

Please resolve this, since crontabs are as fundamental as anything else in Unix/Linux.
[17 Feb 2014 22:45] Terje Røsten
Hi Nick,

there should not be any need to remove crontabs or other packages from your system. 

When using the repo, please follow these steps:

o Install mysql-community-release package for your distribution from:

 http://dev.mysql.com/downloads/repo/

o Edit /etc/yum.repos.d/mysql-community.repo and enable repos you want.

o Run yum update

o Install any package you want

Does this work for you?
[18 Feb 2014 2:09] Nick Harrison
Here is what I am seeing:

1) Packages installed by original OS kickstart process include:

- crontabs
- cronie
- cronie-anacron
- postfix
- mysql-libs
- sysstat

2) To avoid the conflict between mysql-libs and mysql-community-libs, I preemptively remove mysql-libs with "yum remove mysql-libs". This prompts me to remove the following dependencies:

- crontabs
- cronie
- cronie-anacron
- postfix
- sysstat

3) Install mysql-community-release package from:

http://dev.mysql.com/downloads/repo/

4) Enable the mysql-community.repo in /etc/yum.repos.d/mysql-community.repo (specifically for MySQL 5.6).

5) I install mysql-community-server from the mysql.com repo with success.

6) Executing the following command "crontab -e" results in the following:

bash: crontab: command not found

7) The command "yum whatprovides */crontab" reports that the "cronie" package is needed to have this functionality.

8) The command "yum install cronie" returns the following output:

Installing: cronie
Installing for dependencies:

cronie-anacron (repo: base)
crontabs (repo: base)
mysql-libs (repo: updates)
postfix (repo: base)
openssl (updates)

9) This command results in:

Transaction Check Error:

file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package mysql-community-common-5.6.16-1.el6.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package mysql-community-common-5.6.16-1.el6.x86_64
[output truncated...]
file /etc/my.cnf from install of mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package mysql-community-server-5.6.16-1.el6.x86_64

10) I am left without the ability to create crontabs.
[18 Feb 2014 15:20] Terje Røsten
Thanks Nick,

I was able to reproduce.  We are working on a fix.

In the meantime you can avoid the problem by not removing mysql-libs at step 2).

There are logic in packages such that:

 yum install mysql-community-server

at stage 5) will remove mysql-libs and command will succeed.
[28 Mar 2014 21:32] Terje Røsten
Hi again Nick,

with the release of MySQL 5.6.17 the transaction check error in step 9) should be gone.

Please verify.

Thanks.
[16 Jun 2014 5:09] MySQL Verification Team
[28 Mar 21:32] Terje Røsten

As per above note, it is waiting on reporter.
[17 Jul 2014 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[5 Nov 2015 1:31] Systems Group
I think I'm still seeing this error when trying to install mysql-community 5.26.26:

Execution of '/usr/bin/yum -d 0 -e 0 -y --nogpgcheck install mysql-community-client' returned 1: Error: Package: 2:postfix-2.6.6-6.el6_5.x86_64 (@rhe
l-x86_64-server-6)
            Requires: libmysqlclient.so.16()(64bit)
            Removing: mysql-libs-5.1.73-5.el6_6.x86_64 (@rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Obsoleted By: mysql-community-libs-5.6.26-2.el6.x86_64 (ctl-mysql-5_6_26-x86_64-6)
                Not found
            Available: mysql-libs-5.1.47-4.el6.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Available: mysql-libs-5.1.52-1.el6_0.1.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Available: mysql-libs-5.1.61-1.el6_2.1.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Available: mysql-libs-5.1.61-4.el6.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Available: mysql-libs-5.1.66-1.el6_3.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Available: mysql-libs-5.1.66-2.el6_3.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Available: mysql-libs-5.1.67-1.el6_3.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Available: mysql-libs-5.1.69-1.el6_4.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Available: mysql-libs-5.1.71-1.el6.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
            Available: mysql-libs-5.1.73-3.el6_5.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16()(64bit)
 Error: Package: 2:postfix-2.6.6-6.el6_5.x86_64 (@rhel-x86_64-server-6)
            Requires: libmysqlclient.so.16(libmysqlclient_16)(64bit)   
            Removing: mysql-libs-5.1.73-5.el6_6.x86_64 (@rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Obsoleted By: mysql-community-libs-5.6.26-2.el6.x86_64 (ctl-mysql-5_6_26-x86_64-6)
                Not found
            Available: mysql-libs-5.1.47-4.el6.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Available: mysql-libs-5.1.52-1.el6_0.1.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Available: mysql-libs-5.1.61-1.el6_2.1.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Available: mysql-libs-5.1.61-4.el6.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Available: mysql-libs-5.1.66-1.el6_3.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Available: mysql-libs-5.1.66-2.el6_3.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Available: mysql-libs-5.1.67-1.el6_3.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Available: mysql-libs-5.1.69-1.el6_4.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Available: mysql-libs-5.1.71-1.el6.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
            Available: mysql-libs-5.1.73-3.el6_5.x86_64 (rhel-x86_64-server-6)
                libmysqlclient.so.16(libmysqlclient_16)(64bit)             
  You could try using --skip-broken to work around the problem
  You could try running: rpm -Va --nofiles --nodigest
[5 Nov 2015 11:27] Terje Røsten
From your logs:

Obsoleted By: mysql-community-libs-5.6.26-2.el6.x86_64 (ctl-mysql-5_6_26-x86_64-6)
                Not found

Is mysql-community-libs-5.6.26-2.el6.x86_64 package not present in your l-mysql-5_6_26-x86_64-6 repo?

Please add all mysql-community*5.6.26-2.el6.x86_64  package to that repo and recreatre metadata with createrepo, clean cache on client with "yum clean all" and retry install.
[23 Jan 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[6 Apr 2016 16:45] Jörg Brühe
Assuming that "yum install" maps to "rpm -i" (or is similar), (part of) the trouble is caused by using that command:
The "install" action does not honor "obsoletes" directives.

Better use "yum upgrade" or "rpm -i", because this does.
[7 Apr 2016 8:15] Terje Røsten
> Better use "yum upgrade" or "rpm -i", because this does.

Is there a typo here? "rpm -i" will not use obsoletes.

"rpm -i" is very seldom useful, its only useful when you
have parallel-installable packages.

The only valid case I can see is to have multiple kernels installed,
as you don't want to remove the old kernel before you know the updated
kernel works.

For all other cases please use "rpm -Uvh" or even better: use yum, dnf, zypper or other high level package management tool.
[3 May 2016 15:58] Jörg Brühe
Definitely a typo - sorry:  "yum upgrade" or "rpm -U".
[9 Aug 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".