Centos 6.5安裝MySQL-Python遇到的問題--解決辦法一


系統:CentOS release 6.5 (Final)

MySQL版本:mysql  Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using  EditLine wrapper

python版本:Python 3.5.3

[root@sishen yum.repos.d]# yum -y install rpm-build gcc-c++ mysql-devel python-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
  * base: mirrors.aliyun.com
  * extras: mirrors.aliyun.com
  * updates: mirrors.aliyun.com
Setting up Install Process
Package rpm-build-4.8.0-55.el6.x86_64 already installed and latest version
Package gcc-c++-4.4.7-18.el6.x86_64 already installed and latest version
Package python-devel-2.6.6-66.el6_8.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.73-8.el6_8 will be installed
--> Processing Dependency: mysql = 5.1.73-8.el6_8 for package: mysql-devel-5.1.73-8.el6_8.x86_64
--> Running transaction check
---> Package mysql.x86_64 0:5.1.73-8.el6_8 will be installed
--> Processing Dependency: mysql-libs = 5.1.73-8.el6_8 for package: mysql-5.1.73-8.el6_8.x86_64
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be installed
--> Processing Conflict: mysql-devel-5.1.73-8.el6_8.x86_64 conflicts MySQL-devel
--> Finished Dependency Resolution
Error: mysql-devel conflicts with mysql-community-devel-5.7.20-1.el6.x86_64
  You could try using --skip-broken to work around the problem
  You could try running: rpm -Va --nofiles –nodigest

折騰了好半天,還好解決了(本人初學者,見笑了!)

[root@sishen ~]# git clone https://github.com/PyMySQL/mysqlclient-python.git

[root@sishen ~]# cd mysqlclient-python/
[root@sishen mysqlclient-python]# python3.5.3 setup.py install

成功結果如下:

 


免責聲明!

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



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