由于与 mariadb 冲突,MySQL 无法在 CentOS 中安装

标签 mysql linux terminal centos

我刚刚安装了 CentOS Linux,然后下载了 MySQL tar 文件来安装 MySQL。我提取了 6 个随附的 rpm 文件,然后单击 -server rpm 文件进行安装。但是我收到以下对话框错误:

Failed to install file  
Two packages provide the same name.  
This is usually due to mixing packages from different software sources.  

当我尝试从 Linux 终端运行安装程序时,我得到以下更具体的日志,这似乎表明与 mariadb 有冲突:

[root@localhost ~]# yum install /path/to/Downloads/MySQL-server-5.6.21-1.linux_glibc2.5.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining /path/to/Downloads/MySQL-server-5.6.21-1.linux_glibc2.5.x86_64.rpm: MySQL-server-5.6.21-1.linux_glibc2.5.x86_64
Marking /path/to/Downloads/MySQL-server-5.6.21-1.linux_glibc2.5.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package MySQL-server.x86_64 0:5.6.21-1.linux_glibc2.5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:

MySQL 服务器 x86_64 5.6.21-1.linux_glibc2.5 /MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 253 M

Transaction Summary
================================================================================
Install 1 Package

Total size: 253 M
Installed size: 253 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test

Transaction check error:
file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64

Error Summary
-------------
  

虽然我已经在 Windows 中使用 MySQL 很长时间了,但我是 Linux 的新手。这是 Linux 的全新安装,这是我安装的第一个软件,所以我能想象的唯一预先存在的软件是 CentOS 7 中捆绑的东西。显然 MariaDB 已预装在 CentOS 7 中,但是如何我处理这个?

我找到了 this bug report在 Oracle 网站上,但我不知道该怎么做,因为我是 Linux 的新手。

最佳答案

以下对我有用。

$百胜外壳

remove mariadb-libs

run

退出然后安装MYSQL RPM包。

从下面的帖子中得到灵感 https://serverfault.com/questions/613366/install-mysql-on-centos7-with-rpm

关于由于与 mariadb 冲突,MySQL 无法在 CentOS 中安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27113696/

相关文章:

linux - Grep 来自多个文件的值

linux - 在 Linux 中根据文件中的文本拆分大文件的最快方法

linux - linux内核中stop_sched_class有什么用

C# 如何在控制台应用程序中调整终端大小,而不是表单

mysql - 如果数据库中不存在电子邮件地址,则在搜索和电子邮件地址时提供错误 (MySQL)

MySQL 触发器适用于同一张表中的一个字段,不适用于第二个字段

php - 将动态添加的表单元素的值插入mysql数据库

php - 1054 完全连接中的未知列,但不是其他连接

intellij-idea - IntelliJ IDEA 终端看不到命令

ssh - 通过代理与 SSH 连接