解決CentOS安裝mysql*.rpm提示conflicts with file from package

來源:互聯網
上載者:User

解決CentOS安裝mysql*.rpm提示conflicts with file from package

CentOS 6.5下安裝MySQL5.6

解壓檔案:tar xvf MySQL-5.6.19-1.linux_glibc2.5.x86_64.rpm-bundle.tar

釋放出以下檔案:

MySQL-embedded-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-devel-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-shared-compat-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-shared-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-client-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-test-5.6.19-1.linux_glibc2.5.x86_64.rpm

如:

通過lss查看檔案名稱都是紅色的,說明檔案的存取權限比較高,我們用命令“chmod 777 ./*”將許可權改的低一點,

777應該是最低的許可權,相當Windows下everyone可讀可寫可執行,也就是完全控制。

具體可以看一下:chmod 755和chmod 4755的區別

這裡只用到了:

MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
MySQL-client-5.6.19-1.linux_glibc2.5.x86_64.rpm

使用以下命令安裝:

rpm -ivh MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm

錯誤提示如下:

[plain]view plaincopy
  1. Preparing...###########################################[100%]
  2. file/usr/share/mysql/charsets/READMEfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  3. file/usr/share/mysql/czech/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  4. file/usr/share/mysql/danish/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  5. file/usr/share/mysql/dutch/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  6. file/usr/share/mysql/english/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  7. file/usr/share/mysql/estonian/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  8. file/usr/share/mysql/french/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  9. file/usr/share/mysql/german/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  10. file/usr/share/mysql/greek/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  11. file/usr/share/mysql/hungarian/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  12. file/usr/share/mysql/italian/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  13. file/usr/share/mysql/japanese/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  14. file/usr/share/mysql/korean/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  15. file/usr/share/mysql/norwegian-ny/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  16. file/usr/share/mysql/norwegian/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  17. file/usr/share/mysql/polish/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  18. file/usr/share/mysql/portuguese/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  19. file/usr/share/mysql/romanian/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  20. file/usr/share/mysql/russian/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  21. file/usr/share/mysql/serbian/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  22. file/usr/share/mysql/slovak/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  23. file/usr/share/mysql/spanish/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  24. file/usr/share/mysql/swedish/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  25. file/usr/share/mysql/ukrainian/errmsg.sysfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  26. file/usr/share/mysql/charsets/Index.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  27. file/usr/share/mysql/charsets/armscii8.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  28. file/usr/share/mysql/charsets/ascii.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  29. file/usr/share/mysql/charsets/cp1250.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  30. file/usr/share/mysql/charsets/cp1251.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  31. file/usr/share/mysql/charsets/cp1256.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  32. file/usr/share/mysql/charsets/cp1257.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  33. file/usr/share/mysql/charsets/cp850.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  34. file/usr/share/mysql/charsets/cp852.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  35. file/usr/share/mysql/charsets/cp866.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  36. file/usr/share/mysql/charsets/dec8.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  37. file/usr/share/mysql/charsets/geostd8.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  38. file/usr/share/mysql/charsets/greek.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  39. file/usr/share/mysql/charsets/hebrew.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  40. file/usr/share/mysql/charsets/hp8.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  41. file/usr/share/mysql/charsets/keybcs2.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  42. file/usr/share/mysql/charsets/koi8r.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  43. file/usr/share/mysql/charsets/koi8u.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  44. file/usr/share/mysql/charsets/latin1.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  45. file/usr/share/mysql/charsets/latin2.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  46. file/usr/share/mysql/charsets/latin5.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  47. file/usr/share/mysql/charsets/latin7.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  48. file/usr/share/mysql/charsets/macce.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  49. file/usr/share/mysql/charsets/macroman.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
  50. file/usr/share/mysql/charsets/swe7.xmlfrominstallofMySQL-server-5.6.19-1.linux_glibc2.5.x86_64conflictswithfilefrompackagemysql-libs-5.1.71-1.el6.x86_64
看到“conflicts”,是產生衝突了,檔案“/usr/share/mysql/charsets/*”需要MySQL-server-5.6.19-1.linux_glibc2.5.x86_64版本的,而系統已經存在mysql-libs-5.1.71-1.el6.x86_64版本的!

解決辦法:

執行以下命令,刪除mysql-libs-5.1.71-1.el6.x86_64:

yum -y remove mysql-libs-5.1.71*

再執行以下命令安裝MySQL:

rpm -ivh MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm

一切Ok,安裝成功了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.