首页 > 代码库 > ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 解决办法
ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 解决办法
>>> 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 解决办法
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。