MySQL5.7安装依赖包兼容问题:Error: Package: 2:postfix-2.10.1-6.el7.x86_64 (@anaconda)
使用yum安装MySQL5.7客户端,根据官方文档添加社区版的yum仓库mysql-community.repo。
执行
sudo yum install mysql-community-client
报错:
Error: Package: 2:postfix-2.10.1-6.el7.x86_64 (@anaconda)
Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
Removing: 1:mariadb-libs-5.5.56-2.el7.x86_64 (@anaconda)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
Obsoleted By: mysql-community-libs-5.7.20-1.el6.x86_64 (mysql57-community)
Not found
Error: Package: 2:postfix-2.10.1-6.el7.x86_64 (@anaconda)
Requires: libmysqlclient.so.18()(64bit)
Removing: 1:mariadb-libs-5.5.56-2.el7.x86_64 (@anaconda)
libmysqlclient.so.18()(64bit)
Obsoleted By: mysql-community-libs-5.7.20-1.el6.x86_64 (mysql57-community)
~libmysqlclient.so.20()(64bit)
大概意思是postfix-2.10.1-6.el7.x86_64包不兼容。
解决方法:
按错误提示,是因为系统已经安装了mariadb-libs-5.5.56-2.el7.x86_64,与mysql-community不兼容。
查看已安装的mariadb相关的包:
$ yum list installed mariadb\*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
mariadb-libs.x86_64
移除mariadb-libs
sudo yum remove mariadb-libs
重新安装mysql-comunity-client
sudo yum install mysql-community-client