mysqldb需要安装mysql客户端_python2.7安装MySQLdb报错

python2.7安装MySQLdb报错

报错信息如下:

running install

running bdist_egg

running egg_info

writing MySQL_python.egg-info/PKG-INFO

writing top-level names to MySQL_python.egg-info/top_level.txt

writing dependency_links to MySQL_python.egg-info/dependency_links.txt

writing MySQL_python.egg-info/PKG-INFO

writing top-level names to MySQL_python.egg-info/top_level.txt

writing dependency_links to MySQL_python.egg-info/dependency_links.txt

reading manifest file 'MySQL_python.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'MySQL_python.egg-info/SOURCES.txt'

installing library code to build/bdist.linux-i686/egg

running install_lib

running build_py

copying MySQLdb/release.py -> build/lib.linux-i686-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,4,'beta',4) -D__version__=1.2.4b4 -I/usr/include/mysql -I/usr/local/include/python2.7 -c _mysql.c -o build/temp.linux-i686-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1

In file included from _mysql.c:44:

/usr/include/mysql/my_config.h:422:1: warning: "HAVE_WCSCOLL" redefined

In file included from /usr/local/include/python2.7/Python.h:8,

from _mysql.c:29:

/usr/local/include/python2.7/pyconfig.h:917:1: warning: this is the location of the previous definition

gcc -pthread -shared build/temp.linux-i686-2.7/_mysql.o -L/usr/lib -lmysqlclient_r -lpthread -lm -lrt -ldl -o build/lib.linux-i686-2.7/_mysql.so

/usr/bin/ld: cannot find -lmysqlclient_r

collect2: ld returned 1 exit status

error: command 'gcc' failed with exit status 1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值