Linux

centos無法安裝mysql-devel

  • October 1, 2014

每次我嘗試跑步sudo yum install mysql-devel

我遇到以下錯誤:

Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-devel.i686 0:5.1.73-3.el6_5 will be installed
--> Processing Dependency: mysql = 5.1.73-3.el6_5 for package: mysql-devel-5.1.73-3.el6_5.i686
--> Finished Dependency Resolution
Error: Package: mysql-devel-5.1.73-3.el6_5.i686 (updates)
          Requires: mysql = 5.1.73-3.el6_5
          Installed: mysql-5.5.28-1.el6.i686 (@CentALT)
              mysql = 5.5.28-1.el6
          Available: mysql-5.1.71-1.el6.i686 (base)
              mysql = 5.1.71-1.el6
          Available: mysql-5.1.73-3.el6_5.i686 (updates)
              mysql = 5.1.73-3.el6_5
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

我嘗試執行兩個建議的命令無濟於事。有誰知道是什麼阻止了它的安裝?我是否必須設置某個包或其他東西?

..假設CentALTrepo 沒有mysql-devel rpm,您需要重新安裝mysql-server,方法是解除安裝您已有的並base在安裝之前安裝它mysql-devel(兩者都必須從同一個地方安裝)。

yum remove mysql
yum install mysql-devel

您的 mysql 版本與您嘗試安裝的 mysql-devel 版本不同。這是因為你已經根據你的輸出從 CentALT repo 安裝了 mysql。

嘗試

yum --enablerepo=CentALT install mysql-devel

引用自:https://serverfault.com/questions/632792