2014-11-24 55 views
2

我剛剛安裝了CentOS linux,然後下載MySQL tar文件來安裝MySQL。我提取了6個封裝的rpm文件,並點擊了-serverrpm文件進行安裝。但我得到下面的對話框錯誤:mysql不會在CentOS中安裝,因爲與mariadb衝突

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

當我嘗試從Linux終端安裝它,我得到以下更具體的日誌,這似乎表明與MariaDB的衝突:

[[email protected] ~]# 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中號

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 
------------- 

我怎麼能[R解決這個錯誤?

我是全新的linux雖然我一直在Windows中使用MySQL很長一段時間。這是linux的全新安裝,這是我安裝的第一個軟件,所以我能想象的唯一預先存在的軟件將捆綁在CentOS 7中。顯然MariaDB已預裝在CentOS 7中,但我該如何處理?

我在oracle網站上發現了this bug report,但我不知道該怎麼做,因爲我是linux的新手。

+0

你已經安裝了mysql包嗎? 'rpm -qa mysql *'說什麼? – 2014-11-24 20:39:34

+0

@EtanReisner我剛剛打開'terminal'並輸入'rpm -qa mysql *',然後回車。它只給了另一個命令提示符,沒有其他信息。 – CodeMed 2014-11-24 20:46:29

+0

如果你運行'yum install <你點擊的-server rpm文件>',你會得到什麼? – 2014-11-24 20:48:12

回答

6

以下爲我工作。

$百勝殼

remove mariadb-libs

run

退出,然後再安裝MYSQL RPM包。

搜索的破包包:

從以下這爲我工作後 https://serverfault.com/questions/613366/install-mysql-on-centos7-with-rpm

+0

感謝您和+1時間來回答這個老問題。我無法驗證你的答案。但是,如果其他人想要驗證您的答案並發表評論,我會很樂意將您的答案標記爲已接受。 – CodeMed 2016-01-26 22:42:29

+0

這幫了我..謝謝 – kgs 2017-01-17 15:46:03

2

替代解決方案得到了理念(對於如MariaDB的函數庫),

$ rpm -qa | grep mariadb-libs 
mariadb-libs-5.5.52-1.el7.x86_64 

刪除此包:

rpm -ev --nodeps mariadb-libs-5.5.52-1.el7.x86_64 

現在只需安裝mysql rpm或mysql-server。 希望它能解決破包相關問題的任何依賴。