码迷,mamicode.com
首页 > 数据库 > 详细

ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 解决办法

时间:2017-05-15 18:22:09      阅读:321      评论:0      收藏:0      [点我收藏+]

标签:build   ini   lib   line   mysq   cal   erro   dir   mysqldb   

 

>>> import MySQLdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/MySQLdb/__init__.py", line 19, in <module>
  File "build/bdist.linux-x86_64/egg/_mysql.py", line 7, in <module>
  File "build/bdist.linux-x86_64/egg/_mysql.py", line 6, in __bootstrap__
ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory

 

解决办法:

到/opt/mysql/lib/ 目录下,找到 libmysqlclient.so.20.1.0 文件,然后做一个软连接:

ln -s /opt/mysql/lib/libmysqlclient.so.20.1.0 /usr/lib64/libmysqlclient.so.20

ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 解决办法

标签:build   ini   lib   line   mysq   cal   erro   dir   mysqldb   

原文地址:http://www.cnblogs.com/liang545621/p/6857442.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!