CentOS7上执行:yum install MySQL-python失败:
[root@abc example]# yum install MySQL-python
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cn99.com
* centos-qemu-ev: mirrors.aliyun.com
* extras: mirrors.huaweicloud.com
* updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package MySQL-python.x86_64 0:1.2.5-1.el7 will be installed
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: MySQL-python-1.2.5-1.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: MySQL-python-1.2.5-1.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 3:10.1.20-2.el7 will be installed
Removing mariadb-libs.x86_64 3:10.1.20-2.el7 - u due to obsoletes from installed mysql-community-libs-5.7.26-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 3:10.1.20-2.el7 will be installed
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: MySQL-python-1.2.5-1.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: MySQL-python-1.2.5-1.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 3:10.1.20-1.el7 will be installed
--> Processing Dependency: mariadb-common(x86-64) = 3:10.1.20-1.el7 for package: 3:mariadb-libs-10.1.20-1.el7.x86_64
Removing mariadb-libs.x86_64 3:10.1.20-1.el7 - u due to obsoletes from installed mysql-community-libs-5.7.26-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 3:10.1.20-1.el7 will be installed
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: MySQL-python-1.2.5-1.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: MySQL-python-1.2.5-1.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be installed
Removing mariadb-libs.x86_64 1:5.5.60-1.el7_5 - u due to obsoletes from installed mysql-community-libs-5.7.26-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be installed
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: MySQL-python-1.2.5-1.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: MySQL-python-1.2.5-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: MySQL-python-1.2.5-1.el7.x86_64 (base)
Requires: libmysqlclient.so.18()(64bit)
Available: 1:mariadb-libs-5.5.60-1.el7_5.x86_64 (base)
libmysqlclient.so.18()(64bit)
Available: 3:mariadb-libs-10.1.20-1.el7.x86_64 (centos-openstack-pike)
libmysqlclient.so.18()(64bit)
Error: Package: MySQL-python-1.2.5-1.el7.x86_64 (base)
Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
Available: 1:mariadb-libs-5.5.60-1.el7_5.x86_64 (base)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
Available: 3:mariadb-libs-10.1.20-1.el7.x86_64 (centos-openstack-pike)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
Error: Package: 3:mariadb-libs-10.1.20-1.el7.x86_64 (centos-openstack-pike)
Requires: mariadb-common(x86-64) = 3:10.1.20-1.el7
Installed: 3:mariadb-common-10.1.20-2.el7.x86_64 (@centos-openstack-pike)
mariadb-common(x86-64) = 3:10.1.20-2.el7
Available: 3:mariadb-common-10.1.20-1.el7.x86_64 (centos-openstack-pike)
mariadb-common(x86-64) = 3:10.1.20-1.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
解决方法:
下载mysql-community-libs-compat:
https://mirrors.cloud.tencent.com/mysql/yum/mysql57-community-el7/
安装:
rpm -ivh mysql-community-libs-compat-5.7.26-1.el7.x86_64.rpm
重新执行MySQL-python安装:
yum install MySQL-python
|