>>> 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 解决办法的更多相关文章

  1. Hue - Error loading MySQLdb module: libmysqlclient.so.20: cannot open shared object file: No such file or

    解决下面两点异常 >> 1. Hue页面 点击DB 查询时弹出: Error loading MySQLdb module: libmysqlclient.so.20: cannot op ...

  2. /application/zabbix/sbin/zabbix_server: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory

    在启动/usr/local/zabbix/sbin/zabbix_server 时报错如下 此时需要配置一个软连接指向该位置. ln -s /usr/local/mysql/lib/libmysqlc ...

  3. libmysqlclient.so.16: cannot open shared object file: No such file or directory

    编译安装的mysql5.6.39,安装目录是/usr/local/mysql,启用程序时报错:libmysqlclient.so.16: cannot open shared object file: ...

  4. ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory

    在开发一个python项目是,需要用到mysql,但是, 安装完mysql-python后import加载模块提示以下错误: ImportError: libmysqlclient_r.so.16: ...

  5. 关于ImportError: libssl.so.10: cannot open shared object file: No such file or directory unable to load app 0 (mountpoint='') (callable not found or import error)

    一.问题描述 在亚马逊云服务器使用Nginx+uwsgi部署django项目时,项目可以使用python manage.py runserver正常运行,uwsgi测试也没问题,Nginx也正常启动, ...

  6. 解决ImportError: libmysqlclient_r.so.16: cannot open shared object file-乾颐堂

    在开发一个python项目是,需要用到mysql,但是, 安装完mysql-python后import加载模块提示以下错误: ImportError: libmysqlclient_r.so.16: ...

  7. ImportError: libsybdb.so.5: cannot open shared object file: No such file or directory pymssql linux 问题解决 搭建驱动

    [root@hadoop1 nlp]# python sqlserver_t.py Traceback (most recent call last):  File "sqlserver_t ...

  8. error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

    zabbix3.2启动有如下报错: # service zabbix_server startStarting zabbix_server:  /home/zabbix-server/sbin/zab ...

  9. libmysqlclient.so.15: cannot open shared object file: No such file or directory

    错误: ./mafsInRegion: error while loading shared libraries: libmysqlclient.so.15: cannot open shared o ...

随机推荐

  1. ubuntu16上安装openJDK.md

    ubuntu16上安装openJDK.md 环境 操作系统:ubuntu 16.04.2 LTS 安装 当你不需要安装oracle的JDK时,使用openJDK,安装就比较方便. sudo apt-g ...

  2. es6之 async await 使用小计

    var sleep = (time)=>{ return new Promise((resolve,reject)=>{ setTimeout(()=>{ resolve('ok') ...

  3. Flask & Vue 构建前后端分离的应用

    Flask & Vue 构建前后端分离的应用 最近在使用 Flask 制作基于 HTML5 的桌面应用,前面写过<用 Python 构建 web 应用>,借助于完善的 Flask ...

  4. 【转】HttpURLConnection用法详解

    原文链接:http://www.blogjava.net/supercrsky/articles/247449.html 针对JDK中的URLConnection连接Servlet的问题,网上有虽然有 ...

  5. Silverlight & Blend动画设计系列三:缩放动画(ScaleTransform)

    在Silverlight的动画框架中,ScaleTransform类提供了在二维空间中的坐标内进行缩放操作,通过ScaleTransform可以在水平或垂直方向的缩放和拉伸对象,以实现一个简单的缩放动 ...

  6. 关于async和await的一些误区

    微软的MSDN说async和await是“异步”,但是不少人(包括笔者自己)有一些误区需要澄清:为什么await语句之后没有执行?不是异步吗? [示例代码] public partial class ...

  7. logstash结合es,日志收集

    1.下载好logstash后,解压目录 2.进入bin目录,新建文件 logstash_default.conf input { tcp { port => 4560 codec => & ...

  8. Nginx 504错误总结

    Nginx 504错误(Gateway time-out  网关超时)的含义是所请求的网关没有请求到,简单来说就是没有请求到可以执行的PHP-CGI. 一般看来, 这种情况可能是由于nginx默认的f ...

  9. Binder or AIDL的最简单实践

    1.前言: 在Android开发中多进程的合理使用+进程间通信的IPC是一个比较难的点.特别是Android特有的Binder机制,非常复杂,对于应用层开发的初级开发工程师强求深入理解Binder机制 ...

  10. Excel的Sheet页复制

    最近在做一个项目,其中涉及基于模板对Excel的Sheet页进行复制.在网上尝试了很多,发现都不够完美,苦恼. 然后在查阅资料的过程中,发现有一篇提及,POI的API只对同一个Excel文件中的She ...