最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

安装MySQL-python有关问题解决

来源:动视网 责编:小采 时间:2020-11-09 13:31:49
文档

安装MySQL-python有关问题解决

安装MySQL-python有关问题解决:安装MySQL-python问题解决 今天在centos安装MySQL-python,结果报错,报错信息如下: Running command /home/yunpeng.jiangyp/sys/python/bin/python -c import setuptools;__file__='/home/admin/jyp/buil
推荐度:
导读安装MySQL-python有关问题解决:安装MySQL-python问题解决 今天在centos安装MySQL-python,结果报错,报错信息如下: Running command /home/yunpeng.jiangyp/sys/python/bin/python -c import setuptools;__file__='/home/admin/jyp/buil


安装MySQL-python问题解决 今天在centos安装MySQL-python,结果报错,报错信息如下: Running command /home/yunpeng.jiangyp/sys/python/bin/python -c "import setuptools;__file__='/home/admin/jyp/build/MySQL-python/setup.py';exec(compile(open(__fil

安装MySQL-python问题解决

今天在centos安装MySQL-python,结果报错,报错信息如下:

 Running command /home/yunpeng.jiangyp/sys/python/bin/python -c "import setuptools;__file__='/home/admin/jyp/build/MySQL-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-MH5Aya-record/install-record.txt
 running install
 running build
 running build_py
 copying MySQLdb/release.py -> build/lib.linux-x86_-2.7/MySQLdb
 running build_ext
 building '_mysql' extension
 gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/home/yunpeng.jiangyp/sys/python/include/python2.7 -c _mysql.c -o build/temp.linux-x86_-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m -D_GNU_SOURCE -D_FILE_OFFSET_BITS= -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
 _mysql.c:44:23: error: my_config.h: No such file or directory
 _mysql.c:46:19: error: mysql.h: No such file or directory
 _mysql.c:47:26: error: mysqld_error.h: No such file or directory
 _mysql.c:48:20: error: errmsg.h: No such file or directory
 _mysql.c:88: error: expected specifier-qualifier-list before ‘MYSQL’
 _mysql.c:102: error: expected specifier-qualifier-list before ‘MYSQL_RES’

?

google找到答案(http://stackoverflow.com/questions/13044201/install-mysql-python-return-error-in-centos),需要先安装mysql-devel.x86_,通过

sudo yum install mysql-devel.x86_

?

再次安装成功

[yunpeng.jiangyp@v010105 ~]$ pip install MySQL-python
Downloading/unpacking MySQL-python
 Running setup.py egg_info for package MySQL-python
 
Installing collected packages: MySQL-python
 Running setup.py install for MySQL-python
 building '_mysql' extension
 gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/home/yunpeng.jiangyp/sys/python/include/python2.7 -c _mysql.c -o build/temp.linux-x86_-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m -D_GNU_SOURCE -D_FILE_OFFSET_BITS= -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
 gcc -pthread -shared build/temp.linux-x86_-2.7/_mysql.o -L/usr/lib/mysql -L/usr/lib -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lssl -lcrypto -o build/lib.linux-x86_-2.7/_mysql.so
 
Successfully installed MySQL-python
Cleaning up...

?

?

?

文档

安装MySQL-python有关问题解决

安装MySQL-python有关问题解决:安装MySQL-python问题解决 今天在centos安装MySQL-python,结果报错,报错信息如下: Running command /home/yunpeng.jiangyp/sys/python/bin/python -c import setuptools;__file__='/home/admin/jyp/buil
推荐度:
标签: 安装 解决 问题
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top