1-1、mariadb安装失败(包版本冲突)
ERROR : Error appeared during Puppet run: 192.168.8.81_mariadb.pp
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install mariadb' returned 1: Transaction check error:
file /usr/lib64/mysql/plugin/dialog.so from install of mariadb-common-1:10.1.12-4.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64
file /usr/lib64/mysql/plugin/mysql_clear_password.so from install of mariadb-common-1:10.1.12-4.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64
原因分析:包冲突;
解决方法:删除冲突包,指定安装版本即可。
yum -y remove mariadb-libs
yum list --showduplicates mariadb-server #查看包详细版本;
yum -y install mariadb-10.1.12 mariadb-server-10.1.12 mariadb-common-10.1.12
1-2、mariadb安装失败(包缺失)
Error: Package: 1:mariadb-server-10.1.12-4.el7.x86_64 (openstack-mitaka-packages)
Requires: mysql-compat-client(x86-64)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
原因分析:缺少指定版本的依赖包。
yum list --showduplicates mariadb-server
Available Packages
mariadb-server.x86_64 1:5.5.65-1.el7 base
mariadb-server.x86_64 1:10.1.12-4.el7 openstack-mitaka-packages
解决方法:重新指定10.1.12的yum源,同上。
cd /etc/yum.repos.d
cat >>mariadb10.1.repo<<eof
[mariadb]
name = MariaDB
baseurl = https://mirrors.cloud.tencent.com/mariadb/yum/10.1/centos7-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
eof
yum clean all;yum makecache
yum repolist all
yum list --showduplicates mariadb-server #查看包详细版本;
yum -y install mariadb-10.1.12 mariadb-server-10.1.12 mariadb-common-10.1.12 #安装指定版本10.1.12;
1-3、mariadb安装失败(包再次冲突)
Error: galera-4 conflicts with galera-25.3.28-1.rhel7.el7.centos.x86_64
Error: galera-4 conflicts with galera-25.3.29-1.rhel7.el7.centos.x86_64
Error: galera-4 conflicts with galera-25.3.5-6.el7.x86_64
Error: Package: MariaDB-server-10.1.45-1.el7.centos.x86_64 (mariadb)
Requires: galera
原因分析:mariadb-10.1.12指定需要galera-25.3.5;但已安装galera-4;
解决方法:删除冲突包,指定安装包。
yum -y remove galera-4.x86_64
yum -y install mariadb-10.1.12 mariadb-server-10.1.12 mariadb-common-10.1.12 galera-25.3.5
1-4、mariadb安装失败(包再次冲突)
Transaction check error:
file /usr/lib64/mysql/plugin/dialog.so from install of mariadb-common-1:10.1.12-4.el7.x86_64 conflicts with file from package MariaDB-common-10.4.13-1.el7.centos.x86_64
file /usr/lib64/mysql/plugin/mysql_clear_password.so from install of mariadb-common-1:10.1.12-4.el7.x86_64 conflicts with file from package MariaDB-common-10.4.13-1.el7.centos.x86_64
原因分析:mariadb-10.1.12指定需要mariadb-common-10.1.12;但已安装mariadb-common-10.4.13;
解决方法:删除冲突包,指定安装包。
yum -y remove MariaDB-common
yum -y install mariadb-10.1.12 mariadb-server-10.1.12 mariadb-common-10.1.12 galera-25.3.5
1-5、mariadb安装失败(未安装的2个包冲突)
Transaction check error:
file /usr/lib64/mysql/plugin/dialog.so conflicts between attempted installs of mariadb-common-1:10.1.12-4.el7.x86_64 and MariaDB-common-10.1.45-1.el7.centos.x86_64
file /usr/lib64/mysql/plugin/mysql_clear_password.so conflicts between attempted installs of mariadb-common-1:10.1.12-4.el7.x86_64 and MariaDB-common-10.1.45-1.el7.centos.x86_64
原因分析:mariadb-common与MariaDB-common库冲突了;
解决方法:禁用不需要的库MariaDB-common-10.1.45。
yum -y install mariadb-10.1.12 mariadb-server-10.1.12 galera-25.3.5
2、mariadb低版本安装失败
Package 1:mariadb-10.1.12-4.el7.x86_64 is obsoleted by MariaDB-client-10.1.45-1.el7.centos.x86_64 which is already installed
原因分析:yum默认安装高版本。
解决方法:卸载高版本,使用rpm工具安装指定版本及其依赖包。
yum -y remove MariaDB-client
cd /root/openstack-mitaka-packages
rpm -ivh mariadb-10.1.12-4.el7.x86_64.rpm mariadb-common-10.1.12-4.el7.x86_64.rpm