File conflicts with package

Issues related to applications and software problems
Post Reply
Yottabyte
Posts: 3
Joined: 2017/12/08 09:23:42

File conflicts with package

Post by Yottabyte » 2017/12/08 09:56:28

Hi there, I have a VPS; new to it all. (Linux VPS Hosting) and i'm trying to install MariaDB as that's the new mysql for Centos 7. Whenever I type yum -y install mariadb-server mariadb I get spammed with various versions of this error. file /usr/share/mysql/errmsg-utf8.txt from install of MariaDB-server-10.1.29-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.20-1.el7.x86_64

I've looked everywhere and I can't find where this file is located. Does anyone know how I can remove this file, or how to uninstall etc?

Thanks.

tunk
Posts: 348
Joined: 2017/02/22 15:08:17

Re: File conflicts with package

Post by tunk » 2017/12/08 10:56:27

See if you have any mysql packages installed: rpm -qa|grep mysql

User avatar
TrevorH
Forum Moderator
Posts: 23021
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: File conflicts with package

Post by TrevorH » 2017/12/08 12:28:49

file /usr/share/mysql/errmsg-utf8.txt from install of MariaDB-server-10.1.29-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.20-1.el7.x86_64
That means you already have the mysql-community-common packages installed from the mysql-community repo (or manually downloaded and installed). You cannot run both mysql and mariadb at the same time. Obviously we'd recommend that you use our mariadb packages and remove the mysql community ones but you need to check what's required before you remove the one and replace with the other.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Yottabyte
Posts: 3
Joined: 2017/12/08 09:23:42

Re: File conflicts with package

Post by Yottabyte » 2017/12/09 02:54:39

tunk wrote:See if you have any mysql packages installed: rpm -qa|grep mysql
mysql-community-libs-5.7.20-1.el7.x86_64
mysql-community-devel-5.7.20-1.el7.x86_64
mysql57-community-release-el7-10.noarch
mysql-community-common-5.7.20-1.el7.x86_64
mysql-community-libs-compat-5.7.20-1.el7.x86_64
rh-php70-php-mysqlnd-7.0.10-2.el7.x86_64
dovecot-mysql-2.2.10-8.el7.x86_64
php-mysql-5.4.45-56.el7.art.x86_64

how would I remove these? And what ones do I need to remove?
TrevorH wrote:
file /usr/share/mysql/errmsg-utf8.txt from install of MariaDB-server-10.1.29-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.7.20-1.el7.x86_64
That means you already have the mysql-community-common packages installed from the mysql-community repo (or manually downloaded and installed). You cannot run both mysql and mariadb at the same time. Obviously we'd recommend that you use our mariadb packages and remove the mysql community ones but you need to check what's required before you remove the one and replace with the other.
I managed to get mariadb working once and then it stopped working so when I tried to fix it I forgot that rather than install mysql you in mariadb. So I know that mysql isn't required. Since I don't need this mysql; how would I delete it?

pjsr2
Posts: 333
Joined: 2014/03/27 20:11:07

Re: File conflicts with package

Post by pjsr2 » 2017/12/09 13:46:28

Packaged that are installed with yum can be removed by:

Code: Select all

sudo yum erase packagename
Packages installed by rpm can be removed with:

Code: Select all

sudo rpm -e packagename

User avatar
TrevorH
Forum Moderator
Posts: 23021
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: File conflicts with package

Post by TrevorH » 2017/12/09 14:12:47

However... I suspect that there will be other packages that depend on those and if you just yum remove ... that list, it will expand the list and take out all of the dependent packages too. You may not want that so read the list of packages carefully that yum tells you it is going to remove before you blindly reply Y to the prompt. And do not use yum -y !

What do you actually want to achieve and why? Who installed the mysql-community packages and did they do so for a reason? There may be features in mysql 5.7 that are not in our mariadb packages for example (and possibly vice versa).

If you do need to remove them and replace with the mariadb versions then the IUS Community repo has a yum-plugin-replace package that you can install that allows yum to replace one set of packages with another without removing the dependencies. You can also use the yum shell command which allows you to stack up yum commands and run them as one transaction - e.g

Code: Select all

yum shell
remove mysql-community-libs mysql-community-devel mysql-community-common mysql-community-libs-compat 
install mariadb-libs  mariadb-devel
run
However, I notice that in your list of mysql-community packages you do not have mysql-community-server installed so at the present you're not running a mysql server on this machine.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Yottabyte
Posts: 3
Joined: 2017/12/08 09:23:42

Re: File conflicts with package

Post by Yottabyte » 2017/12/10 04:18:34

I gave up and just reinstalled the VPS. I have everything running successfully. Thank you.

Post Reply