优米格
分享有营养的

安装Mariadb时Mariadb依赖库跟原来安装的mysql community版本依赖冲突解决

BraUndress.png

在一台原来安装了mysql community版本的机器上,安装Mariadb,出错:

Transaction check error:
  file /etc/my.cnf from install of MariaDB-common-10.6.4-1.el7.centos.x86_64 conflicts with file from package mysql-community-server-8.0.25-1.el7.x86_64
  file /usr/lib64/libmysqlclient.so.18.0.0 from install of MariaDB-compat-10.6.4-1.el7.centos.x86_64 conflicts with file from package Percona-XtraDB-Cluster-shared-55-1:5.5.37-25.10.756.el6.x86_64

查看当前安装的mysql:

[xiaofang@sd-vm-0003935 soft-pkg]$ sudo rpm -qa |grep -i mysql
mysql-community-client-8.0.25-1.el7.x86_64
mysql-community-libs-8.0.25-1.el7.x86_64
mysql-community-client-plugins-8.0.25-1.el7.x86_64
mysql-community-server-8.0.25-1.el7.x86_64
mysql-community-common-8.0.25-1.el7.x86_64

解决办法是卸载原来的mysql及mysql lib依赖,操作如下:

# 卸载mysql
[xiaofang@sd-vm-0003935 soft-pkg]$ sudo yum remove  mysql-*
# 卸载依赖
yum remove mysql-libs

然后执行安装mariadb就可以了:

sudo yum -y install MariaDB-com*

通过rpm方式安装Mariadb参考: 基于Mariadb 10.6.4在CentOS 7环境下配置Galera Cluster集群

赞(1)
未经允许禁止转载:优米格 » 安装Mariadb时Mariadb依赖库跟原来安装的mysql community版本依赖冲突解决

评论 抢沙发

合作&反馈&投稿

商务合作、问题反馈、投稿,欢迎联系

广告合作侵权联系