Cause of the matter:
The system version is Centos6.6, since the previous colleague did not adopt a minimized selective installation, so the system was installed with the following three installation packages from the mysql5.1:
grep mysqlmysql-5.1. 3. El6_6.x86_64mysql-devel-5.1. 3. El6_6.x86_64mysql-lib-5.1. 3. el6_6.x86_64
Before installing the new version of MySQL, only the MySQL and Mysql-devel were uninstalled, but the mysql-libs was not uninstalled successfully because of the dependency, so I intend to replace it with the RPM update operation:
[Email protected] ~/downloads/v137788- on]# RPM-UVH mysql-commercial-libs-5.7. A-1.1. el6.x86_64.rpm Warning:mysql-commercial-client-5.7. A-1.1. El6.x86_64.rpm:Header V3 dsa/SHA1 Signature, key ID 5072e1f5:nokeyerror:failed dependencies:mysql-commercial-common (x86- -) =5.7. A-1.1. El6 is needed by mysql-commercial-libs-5.7. A-1.1. el6.x86_64 libmysqlclient.so. -() (64bit) is needed by (installed) postfix-2:2.6.6-6. el6_5.x86_64 libmysqlclient.so. -(LIBMYSQLCLIENT_16) (64bit) is needed by (installed) postfix-2:2.6.6-6. el6_5.x86_64
It seems to be added on:Mysql-commercial-common
[Email protected] ~/downloads/v137788- on]# Rpm-u mysql-commercial-libs-5.7. A-1.1. el6.x86_64.rpm mysql-commercial-common-5.7. A-1.1. el6.x86_64.rpm Warning:mysql-commercial-libs-5.7. A-1.1. El6.x86_64.rpm:Header V3 dsa/SHA1 Signature, key ID 5072e1f5:nokeyerror:failed dependencies:libmysqlclient.so. -() (64bit) is needed by (installed) postfix-2:2.6.6-6. el6_5.x86_64 libmysqlclient.so. -(LIBMYSQLCLIENT_16) (64bit) is needed by (installed) postfix-2:2.6.6-6. el6_5.x86_64
But this still can not solve, and unload postfix will cause more RPM package unload, this implementation cost is increased, not willing to see, so think of creating local Yum source to update the software:
installation Createrepo[[email protected]~/downloads/v137788- on]#Yum Install-y createrepo Create local Yum source directory [[email protected]~/downloads/v137788- on]#mkdir/opt/soft; cd/opt/soft/and move the MySQL RPM package file to this directory #[[email protected]/opt/soft]#MV~/downloads/v137788- on/mysql*./=================================================================================
view [[email protected]/opt/soft]#lsLibmcrypt-2.5.8-4.3. X86_64.rpmlibmcrypt-devel-2.5.8-4.3. X86_64.rpmmysql-commercial-client-5.7. A-1.1. El6.x86_64.rpmmysql-commercial-common-5.7. A-1.1. El6.x86_64.rpmmysql-commercial-devel-5.7. A-1.1. El6.x86_64.rpmmysql-commercial-embedded-5.7. A-1.1. El6.x86_64.rpmmysql-commercial-embedded-devel-5.7. A-1.1. El6.x86_64.rpmmysql-commercial-libs-5.7. A-1.1. El6.x86_64.rpmmysql-commercial-libs-compat-5.7. A-1.1. El6.x86_64.rpmmysql-commercial-server-5.7. A-1.1. El6.x86_64.rpmmysql-commercial-test-5.7. A-1.1. El6.x86_64.rpmnginx-1.9. the-1. el6.icefox.x86_64.rpm Creating local Yum source information using Createrepo [email protected]/]# createrepo-v/opt/soft/ In this case, one more directory in the local Yum source directory (the file information for the RPM package with the local Yum source)
[[email protected]/opt/soft]# ls
libmcrypt-2.5.8-4.3.x86_64.rpm
libmcrypt-devel-2.5.8-4.3.x86_64.rpm
mysql-commercial-client-5.7.12-1.1.el6.x86_64.rpm
mysql-commercial-common-5.7.12-1.1.el6.x86_64.rpm
mysql-commercial-devel-5.7.12-1.1.el6.x86_64.rpm
mysql-commercial-embedded-5.7.12-1.1.el6.x86_64.rpm
mysql-commercial-embedded-devel-5.7.12-1.1.el6.x86_64.rpm
mysql-commercial-libs-5.7.12-1.1.el6.x86_64.rpm
mysql-commercial-libs-compat-5.7.12-1.1.el6.x86_64.rpm
mysql-commercial-server-5.7.12-1.1.el6.x86_64.rpm
mysql-commercial-test-5.7.12-1.1.el6.x86_64.rpm
nginx-1.9.15-1.el6.icefox.x86_64.rpm
repodata
=================================================================================
Edit Repo file [[Email protected]/]# vim/etc/Yum. repos.d/Local.repo[lc]name=local-Rpmbaseurl=file:///Opt/softEnabled=1Gpgcheck=0
Install new Mysql[[email protected]/]#Yum InstallMysql-commercial-libs Mysql-commercial-server mysql-commercial-client Mysql-commercial-devel
...
Installed:
Mysql-commercial-client.x86_64 0:5.7.12-1.1.el6
Mysql-commercial-devel.x86_64 0:5.7.12-1.1.el6
Mysql-commercial-libs.x86_64 0:5.7.12-1.1.el6
Mysql-commercial-libs-compat.x86_64 0:5.7.12-1.1.el6
Mysql-commercial-server.x86_64 0:5.7.12-1.1.el6
Dependency installed:
Mysql-commercial-common.x86_64 0:5.7.12-1.1.el6
Replaced:
Mysql-libs.x86_64 0:5.1.73-3.el6_5
complete!
The problem here is solved, install the new version of MySQL and remove the old version.
Summarize:
1) Use an absolute path instead of a relative path when creating local RPM source information using the Createrepo command;
2) If a new package needs to be placed in the local Yum source, the Createrepo Update local RPM source information needs to be performed again;
3) Local Yum source is a good solution to the dependencies between older versions of software, and no longer requires a manual one-step solution.
To create a local RPM source update system legacy software