解决centos7 yum安装MySQL rpm包出现conflict problem

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:

[root@localhost mysqlrmp]# rpm -ivh MySQL-server-5.6.37-1.el7.x86_64.rpm

出现如下报错:
Preparing... ################################# [100%]
file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64
file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.6.37-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.44-2.el7.centos.x86_64

解决办法:yum remove mysql-libs

Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.44-2.el7.centos will be erased
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
--> Running transaction check
---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
Package Arch Version Repository Size

Removing:
mariadb-libs x86_64 1:5.5.44-2.el7.centos @anaconda 4.4 M
Removing for dependencies:
postfix x86_64 2:2.10.1-6.el7 @anaconda 12 M

Transaction Summary

Remove 1 Package (+1 Dependent package)

Installed size: 17 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Erasing : 2:postfix-2.10.1-6.el7.x86_64 1/2 
Erasing : 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 2/2 
Verifying : 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 1/2 
Verifying : 2:postfix-2.10.1-6.el7.x86_64 2/2

Removed:
mariadb-libs.x86_64 1:5.5.44-2.el7.centos

Dependency Removed:
postfix.x86_64 2:2.10.1-6.el7

Complete!


本文转自 运维天空 51CTO博客,原文链接:http://blog.51cto.com/jason83/2047230


相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
4天前
|
关系型数据库 MySQL 数据库
《MySQL 简易速速上手小册》第1章:MySQL 基础和安装(2024 最新版)
《MySQL 简易速速上手小册》第1章:MySQL 基础和安装(2024 最新版)
28 4
|
14小时前
|
Linux
centos 6.5安装yum
centos 6.5安装yum
4 0
|
2天前
|
存储 Linux 网络安全
centos7使用yum网络安装
这些是使用Yum进行网络安装的基本步骤。根据你的需求,你可以重复步骤3和4来安装其他软件包。请注意,执行Yum操作需要root或具有sudo权限的用户。
12 1
|
7天前
|
关系型数据库 MySQL Linux
Linux联网安装MySQL Server
Linux联网安装MySQL Server
20 0
|
7天前
|
关系型数据库 MySQL Linux
centos7安装mysql-带网盘安装包
centos7安装mysql-带网盘安装包
45 2
|
11天前
|
关系型数据库 MySQL 数据库
Docker安装MySQL
Docker安装MySQL
22 1
|
15天前
|
关系型数据库 MySQL 数据库
mysql卸载、下载、安装(window版本)
mysql卸载、下载、安装(window版本)
|
1月前
|
关系型数据库 MySQL 数据库连接
关于MySQL-ODBC的zip包安装方法
关于MySQL-ODBC的zip包安装方法
|
1月前
|
关系型数据库 MySQL 数据库
rds安装数据库客户端工具
安装阿里云RDS的数据库客户端涉及在本地安装对应类型(如MySQL、PostgreSQL)的客户端工具。对于MySQL,可选择MySQL Command-Line Client或图形化工具如Navicat,安装后输入RDS实例的连接参数进行连接。对于PostgreSQL,可以使用`psql`命令行工具或图形化客户端如PgAdmin。首先从阿里云控制台获取连接信息,然后按照官方文档安装客户端,最后配置客户端连接以确保遵循安全指引。
85 1
|
28天前
|
Ubuntu 关系型数据库 MySQL
Ubuntu 中apt 安装MySQL数据库
Ubuntu 中apt 安装MySQL数据库
68 0