安装时报如下错误:
[root@mysql tmp]# rpm -ivh mysql-community-server-5.7.9-1.el6.x86_64.rpm warning: mysql-community-server-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY error: Failed dependencies: mysql-community-client(x86-64) = 5.7.9-1.el6 is needed by mysql-community-server-5.7.9-1.el6.x86_64 mysql-community-common(x86-64) = 5.7.9-1.el6 is needed by mysql-community-server-5.7.9-1.el6.x86_64 [root@mysql tmp]# rpm -ivh mysql-community-common-5.7.9-1.el6.x86_64.rpm warning: mysql-community-common-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] file /usr/share/mysql/czech/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/danish/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/dutch/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/english/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/estonian/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/french/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/german/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/greek/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/italian/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/japanese/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/korean/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/polish/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/romanian/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/russian/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/serbian/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/slovak/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/spanish/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/swedish/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/Index.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/armscii8.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/ascii.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/cp1250.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/cp1256.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/cp1257.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/cp850.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/cp852.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/cp866.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/dec8.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/geostd8.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/greek.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/hebrew.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/hp8.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/keybcs2.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/koi8r.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/koi8u.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/latin1.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/latin2.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/latin5.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/latin7.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/macce.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/macroman.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 file /usr/share/mysql/charsets/swe7.xml from install of mysql-community-common-5.7.9-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64 [root@mysql tmp]# [root@mysql tmp]#
解决方案:删除原来的包,重新安装。
[root@mysql tmp]# yum -y remove mysql-libs-* <<< remove mysql package... Loaded plugins: product-id, refresh-packagekit, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package mysql-libs.x86_64 0:5.1.66-2.el6_3 will be erased --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64 --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64 --> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-2.2.el6_1.x86_64 --> Running transaction check ---> Package postfix.x86_64 2:2.6.6-2.2.el6_1 will be erased --> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-7.el6.x86_64 --> Processing Dependency: /usr/sbin/sendmail for package: redhat-lsb-core-4.0-7.el6.x86_64 --> Running transaction check ---> Package cronie.x86_64 0:1.4.4-7.el6 will be erased --> Processing Dependency: cronie = 1.4.4-7.el6 for package: cronie-anacron-1.4.4-7.el6.x86_64 ---> Package redhat-lsb-core.x86_64 0:4.0-7.el6 will be erased --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-printing-4.0-7.el6.x86_64 --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.el6 for package: redhat-lsb-4.0-7.el6.x86_64 --> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-graphics-4.0-7.el6.x86_64 --> Running transaction check ---> Package cronie-anacron.x86_64 0:1.4.4-7.el6 will be erased ---> Package redhat-lsb.x86_64 0:4.0-7.el6 will be erased --> Processing Dependency: redhat-lsb(x86-64) = 4.0-7.el6 for package: redhat-lsb-compat-4.0-7.el6.x86_64 ---> Package redhat-lsb-graphics.x86_64 0:4.0-7.el6 will be erased ---> Package redhat-lsb-printing.x86_64 0:4.0-7.el6 will be erased --> Running transaction check ---> Package redhat-lsb-compat.x86_64 0:4.0-7.el6 will be erased --> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch --> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-20.el6.x86_64 --> Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package crontabs.noarch 0:1.10-33.el6 will be erased ---> Package sysstat.x86_64 0:9.0.4-20.el6 will be erased --> Finished Dependency Resolution file:///media/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/repodata/repomd.xml Trying other mirror. Dependencies Resolved =========================================================================================================================================================================================== Package Arch Version Repository Size =========================================================================================================================================================================================== Removing: mysql-libs x86_64 5.1.66-2.el6_3 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 4.0 M Removing for dependencies: cronie x86_64 1.4.4-7.el6 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 166 k cronie-anacron x86_64 1.4.4-7.el6 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 43 k crontabs noarch 1.10-33.el6 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 2.4 k postfix x86_64 2:2.6.6-2.2.el6_1 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 9.7 M redhat-lsb x86_64 4.0-7.el6 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 0.0 redhat-lsb-compat x86_64 4.0-7.el6 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 0.0 redhat-lsb-core x86_64 4.0-7.el6 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 22 k redhat-lsb-graphics x86_64 4.0-7.el6 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 0.0 redhat-lsb-printing x86_64 4.0-7.el6 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 0.0 sysstat x86_64 9.0.4-20.el6 @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4 807 k Transaction Summary =========================================================================================================================================================================================== Remove 11 Package(s) Installed size: 15 M Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Erasing : redhat-lsb-compat-4.0-7.el6.x86_64 1/11 Erasing : redhat-lsb-4.0-7.el6.x86_64 2/11 Erasing : redhat-lsb-graphics-4.0-7.el6.x86_64 3/11 Erasing : redhat-lsb-printing-4.0-7.el6.x86_64 4/11 Erasing : redhat-lsb-core-4.0-7.el6.x86_64 5/11 Erasing : sysstat-9.0.4-20.el6.x86_64 6/11 /var/tmp/rpm-tmp.Y85uQ6: line 1: lsb_release: command not found Erasing : crontabs-1.10-33.el6.noarch 7/11 Erasing : cronie-anacron-1.4.4-7.el6.x86_64 8/11 Erasing : cronie-1.4.4-7.el6.x86_64 9/11 Erasing : 2:postfix-2.6.6-2.2.el6_1.x86_64 10/11 Erasing : mysql-libs-5.1.66-2.el6_3.x86_64 11/11 Verifying : redhat-lsb-4.0-7.el6.x86_64 1/11 Verifying : redhat-lsb-graphics-4.0-7.el6.x86_64 2/11 Verifying : 2:postfix-2.6.6-2.2.el6_1.x86_64 3/11 Verifying : redhat-lsb-compat-4.0-7.el6.x86_64 4/11 Verifying : redhat-lsb-printing-4.0-7.el6.x86_64 5/11 Verifying : cronie-anacron-1.4.4-7.el6.x86_64 6/11 Verifying : redhat-lsb-core-4.0-7.el6.x86_64 7/11 Verifying : crontabs-1.10-33.el6.noarch 8/11 Verifying : sysstat-9.0.4-20.el6.x86_64 9/11 Verifying : mysql-libs-5.1.66-2.el6_3.x86_64 10/11 Verifying : cronie-1.4.4-7.el6.x86_64 11/11 Removed: mysql-libs.x86_64 0:5.1.66-2.el6_3 Dependency Removed: cronie.x86_64 0:1.4.4-7.el6 cronie-anacron.x86_64 0:1.4.4-7.el6 crontabs.noarch 0:1.10-33.el6 postfix.x86_64 2:2.6.6-2.2.el6_1 redhat-lsb.x86_64 0:4.0-7.el6 redhat-lsb-compat.x86_64 0:4.0-7.el6 redhat-lsb-core.x86_64 0:4.0-7.el6 redhat-lsb-graphics.x86_64 0:4.0-7.el6 redhat-lsb-printing.x86_64 0:4.0-7.el6 sysstat.x86_64 0:9.0.4-20.el6 Complete! [root@mysql tmp]#
重新安装:
[root@mysql tmp]# rpm -ivh mysql-community-common-5.7.9-1.el6.x86_64.rpm warning: mysql-community-common-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-common ########################################### [100%] [root@mysql tmp]# rpm -ivh mysql-community-libs-5.7.9-1.el6.x86_64.rpm warning: mysql-community-libs-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-libs ########################################### [100%] [root@mysql tmp]# rpm -ivh mysql-community-client-5.7.9-1.el6.x86_64.rpm warning: mysql-community-client-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-client ########################################### [100%] [root@mysql tmp]# rpm -ivh mysql-community-server-5.7.9-1.el6.x86_64.rpm warning: mysql-community-server-5.7.9-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-server ########################################### [100%] [root@mysql tmp]#
这里要注意安装顺序。
The End.