报错:libmysqlclient.so.18: cannot open shared object file: No such file or directory.
程序员文章站
2022-07-15 16:49:26
...
用pycharm连接MySQL数据库时,报错如下:django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient.so.18: cannot open shared object file: No such file or directory. Did you install mysqlclient or MySQL-python?
在网上查找了资料,大部分都是建立软链接,但我搜索了一下没有/usr/local/mysql
这个目录,也没有libmysqlclient.so.18
这个文件。
解决办法:
sudo pip uninstall MySQL-python (uninstall from your package manager of choice)
sudo apt-get install libmysqlclient-dev
sudo pip install MySQL-python
现在已经可以正常import MySQLdb
上一篇: CAT介绍
下一篇: validate校验及自定义验证规则
推荐阅读
-
解决启动MongoDB错误:error while loading shared libraries: libstdc++.so.6:cannot open shared object file:
-
Tensorflow:ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory
-
libiconv.so.2 cannot open shared object file: No such file or directory
-
libmatio.so.2: cannot open shared object file: No such file or directory
-
libevent-2.0.so.5: cannot open shared object file: No such file or directory
-
报错:libmysqlclient.so.18: cannot open shared object file: No such file or directory.
-
libcudart.so.9.2: cannot open shared object file: No such file or directory
-
解决error while loading shared libraries: libXXX.so.X: cannot open shared object file: No such file
-
error while loading shared libraries: xxx: cannot open shared object file: No such file or directory
-
Oracle执行netca命令报cannot open shared object file: No such file or directory