安装MYSQL错误“conflicts with file from package mysql-libs-*” 解决方法

Posted xz_xiaoshan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装MYSQL错误“conflicts with file from package mysql-libs-*” 解决方法相关的知识,希望对你有一定的参考价值。

安装mysql的时候时:


错误现象:


[root@localhost opt]# rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.rpm 
Preparing...                ########################################### [100%]
	file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64

错误原因:

原因由包冲突引起的!


解决方法:

先移除冲突的libs包,再进行安装。

yum -y remove mysql-libs-5.1.61*

-y的意思就是不用询问是否remove卸载完成之后,

然后再执行命令

rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.rpm
安装MySQL就可以成功了,如下:

[root@localhost opt]# rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password \'new-password\'
/usr/bin/mysqladmin -u root -h localhost.localdomain password \'new-password\'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

[root@localhost opt]# 




以上是关于安装MYSQL错误“conflicts with file from package mysql-libs-*” 解决方法的主要内容,如果未能解决你的问题,请参考以下文章

CentOS安装mysql rpm提示conflicts with file from package的解决办法

lnmp一键安装包卸载mysql,重新安装报错mysql57-community-release conflicts with mysql-community-release-el6-5.noarch

conflicts with file from package mariadb-libs

错误:docker-ce conflicts with 2:docker-1.13.1-74.git

mysql-5.1.73-7.el6.x86_64 conflicts with file from package MySQL-client-5.5.45-1.el6.x86_64

mariadb-server安装问题(Error: MariaDB-common conflicts with 1:mariadb-libs-5.5.60-1.el7_5.x86_64)