mysql-connector-python 源码安装
一、下载mysql-connector-python的源码包:
下载页面:
https://dev.mysql.com/downloads/connector/python/
我这下载的是mysql-connector-python-2.1.6 这个版本,它的源码包下载地址如下:
https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-2.1.6-1.sles12.src.rpm
二、从src.rpm 格式的文件中解压出源码包 tar.gz:
rpm2cpio mysql-connector-python-2.1.6-1.sles12.src.rpm | cpio -i --make-directories
ll
-rwxrwxrwx 1 jianglexing jianglexing 11852269 Jul 19 13:04 mysql-connector-python-2.1.6-1.sles12.src.rpm
-rw-r--r-- 1 root root 11842735 Jul 19 13:11 mysql-connector-python-2.1.6.tar.gz
-rw-r--r-- 1 root root 10357 Jul 19 13:11 mysql-connector-python.spec
三、从tar.gz 中解压出源码:
tar -xzvf mysql-connector-python-2.1.6.tar.gz
cd mysql-connector-python-2.1.6
四、安装mysql-connector-python:
python setup.py build
python setup.py install
----