问题描述
在安装MySQL过程中出现错误 file /etc/my.cnf from install of mysql-community-server-xxx conflicts with file from package mariadb-connector-c-config-xxx.noarch
提示。
具体错误信息如下:
Total 588 kB/s | 1.4 MB 00:02Running transaction checkTransaction check succeeded.Running transaction testThe downloaded packages were saved in cache until the next successful transaction.You can remove cached packages by executing 'yum clean packages'.Error: Transaction test error: file /etc/my.cnf from install of mysql-community-server-8.0.15-1.el7.x86_64 conflicts with file from package mariadb-connector-c-config-3.1.11-2.el8_3.noarch
报错截图如下:
原因分析
从错误信息中看,是冲突了,因为错误信息中有写 conflicts with file from package
,但是这是一个全新的Linux8,正常没有安装过MySQL也没有安装过Mariadb,所以猜测是该Linux机器内嵌集成了该Mariadb包,造成冲突。
解决办法
- 查看本机被内嵌的Mariadb
rpm -qa | grep mariadb
可以看到执行查找的时候,在系统中有内嵌两个mariadb包
- 使用
rpm -e --nodeps package
将内嵌集成的Mariadb卸载掉
rpm -e --nodeps mariadb-connector-c-config-3.1.11-2.el8_3.noarchrpm -e --nodeps mariadb-connector-c-3.1.11-2.el8_3.x86_64
执行卸载如图所示:
- 卸载掉冲突的mariadb后,再次尝试安装mysql成功
注:本文原创由 bluetata
发布于https://bluetata.blog.csdn.net/、转载请务必注明出处。
来源地址:https://blog.csdn.net/dietime1943/article/details/127636430