欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 运维知识 > 数据库 >内容正文

数据库

/usr/bin/ld: cannot find -lmysqlclient_r

发布时间:2025/5/22 数据库 53 豆豆
生活随笔 收集整理的这篇文章主要介绍了 /usr/bin/ld: cannot find -lmysqlclient_r 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

/usr/bin/ld: cannot find -lmysqlclient_r

2008年11月25日 | 标签: mysqlclient_r, python, 数据库

今天在家里电脑准备安装django环境,当然肯定用mysql数据库了。PYTHON要操作MYSQL,必须得安装扩展名–mysql-python,(mysql-python-1.2.2).在安装期间提示标题所写(/usr/bin/ld: cannot find -lmysqlclient_r),

执行以下命令:

echo “/usr/local/mysql/lib/mysql” >> /etc/ld.so.conf(我的环境是centos 5)

ldconfig,执行以后还是提示以上错误。 

———————–

后来看来一下README,原文在下面

——————-

threadsafe
        thread-safe client library (libmysqlclient_r) if True (default);
        otherwise use non-thread-safe (libmysqlclient). You should
        always use the thread-safe library if you have the option;
        otherwise you *may* have problems.

———————————

得知得修改site.cfg,将thread-safe设为false,一切OK!

python setup.py install

总结

以上是生活随笔为你收集整理的/usr/bin/ld: cannot find -lmysqlclient_r的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。