![无法在 CentOS 6.6 上安装 MySQL 服务器](https://linux22.com/image/658665/%E6%97%A0%E6%B3%95%E5%9C%A8%20CentOS%206.6%20%E4%B8%8A%E5%AE%89%E8%A3%85%20MySQL%20%E6%9C%8D%E5%8A%A1%E5%99%A8.png)
我尝试了以下命令
[root@n yum.repos.d]# rpm -qa | grep mysql
mysql-libs-5.1.73-3.el6_5.x86_64
mysql-community-release-fc21-5.noarch
[root@n yum.repos.d]#
但我给出了以下命令
[root@n yum.repos.d]# yum remove mysql
Setting up Remove Process
No Match for argument: mysql
Package(s) mysql available, but not installed.
No Packages marked for removal
[root@n yum.repos.d]#
我尝试安装 mysql 但显示以下错误
[root@n yum.repos.d]# rpm -ivh http://repo.mysql.com/mysql-community-release-el5-5.noarch.rpm
Retrieving http://repo.mysql.com/mysql-community-release-el5-5.noarch.rpm
Preparing... ########################################### [100%]
package mysql-community-release-fc21-5.noarch (which is newer than mysql-community-release-el5-5.noarch) is already installed
file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql from install of mysql-community-release-el5-5.noarch conflicts with file from package mysql-community-release-fc21-5.noarch
file /etc/yum.repos.d/mysql-community-source.repo from install of mysql-community-release-el5-5.noarch conflicts with file from package mysql-community-release-fc21-5.noarch
file /etc/yum.repos.d/mysql-community.repo from install of mysql- community-release-el5-5.noarch conflicts with file from package mysql- community-release-fc21-5.noarch
[root@n yum.repos.d]# dir
CentOS-Base.repo CentOS-Vault.repo
CentOS-Debuginfo.repo epel.repo
CentOS-fasttrack.repo epel-testing.repo
CentOS-Media.repo mysql-community-release-el6-5.noarch.rpm
[root@n yum.repos.d]#
有人可以帮忙解决这个问题吗?
答案1
mysql-community-release-fc21-5.noarch
你根本就不应该安装。该 RPM 明确标明适用于 fedora core 21。
yum erase mysql-community-release-fc21-5.noarch
。
接下来,您要尝试安装mysql-community-release-el5-5.noarch.rpm
。安装后,您会回到开始的位置,并看到略有不同的错误消息。该 RPM 明确标明适用于 el5(CentOS 5.x RHEL 5.x)。
作为官方文档明确指出,您需要下载标记为 el6 的版本。
For an EL6-based system, the command is in the form of:
shell> sudo yum localinstall mysql-community-release-el6-{version-number}.noarch.rpm