---
title: "Linux上安装MySQL时出现不兼容的解决办法"
author: "laiahu"
date: "2013-07-13T18:01:54Z"
tags: ["Linux", "MySQL"]
categories: ["编程语言"]
slug: "linux-mysql"
draft: false
lastmod: "2013-07-13T18:01:54Z"
id: 1905501
url: "https://laiahu.iteye.com/blog/1905501"
---

来源： [http://blog.csdn.net/kunshan\_shenbin/article/details/7612834](http://blog.csdn.net/kunshan_shenbin/article/details/7612834)

 

\[root@localhost ~]# rpm -ivh MySQL-server-5.5.24-1.linux2.6.x86\_64.rpm   
Preparing...                ########################################### \[100%]  
        file /usr/share/mysql/charsets/README from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64  
        file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64

        file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.5.24-1.linux2.6.x86\_64 conflicts with file from package mysql-libs-5.1.61-1.el6\_2.1.x86\_64

**原因是系统已经安装了其他版本的mysql-libs包导致不兼容。**

\[root@localhost ~]# yum list | grep mysql                                                                                                                                 
**mysql-libs.x86\_64                    5.1.61-1.el6\_2.1          @updates**           
apr-util-mysql.x86\_64                1.3.9-3.el6\_0.1           base               
bacula-director-mysql.x86\_64         5.0.0-9.el6               base               
bacula-storage-mysql.x86\_64          5.0.0-9.el6               base               
dovecot-mysql.x86\_64                 1:2.0.9-2.el6\_1.1         base               
freeradius-mysql.x86\_64              2.1.10-5.el6              base               
libdbi-dbd-mysql.x86\_64              0.8.3-5.1.el6             base               
mod\_auth\_mysql.x86\_64                1:3.0.0-11.el6\_0.1        base               
mysql.x86\_64                         5.1.61-1.el6\_2.1          updates            
mysql-bench.x86\_64                   5.1.61-1.el6\_2.1          updates            
mysql-connector-java.x86\_64          1:5.1.12-2.el6            base               
mysql-connector-odbc.x86\_64          5.1.5r1144-7.el6          base               
mysql-devel.i686                     5.1.61-1.el6\_2.1          updates            
mysql-devel.x86\_64                   5.1.61-1.el6\_2.1          updates            
mysql-embedded.i686                  5.1.61-1.el6\_2.1          updates            
mysql-embedded.x86\_64                5.1.61-1.el6\_2.1          updates            
mysql-embedded-devel.i686            5.1.61-1.el6\_2.1          updates            
mysql-embedded-devel.x86\_64          5.1.61-1.el6\_2.1          updates            
mysql-libs.i686                      5.1.61-1.el6\_2.1          updates            
mysql-server.x86\_64                  5.1.61-1.el6\_2.1          updates            
mysql-test.x86\_64                    5.1.61-1.el6\_2.1          updates            
php-mysql.x86\_64                     5.3.3-3.el6\_2.8           updates            
qt-mysql.i686                        1:4.6.2-20.el6            base               
qt-mysql.x86\_64                      1:4.6.2-20.el6            base               
rsyslog-mysql.x86\_64                 4.6.2-12.el6              base             

**删除mysql-libs**

\[root@localhost ~]# **yum remove mysql-libs**

......

\[root@localhost ~]# **rpm -ivh MySQL-server-5.5.24-1.linux2.6.x86\_64.rpm**                                                                                                    
Preparing...                ########################################### \[100%]  
   1:MySQL-server           ########################################### \[100%]