CentOS7 安裝MySQL-python失敗解決方法


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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM