我嘗試了以下命令
[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