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

时间: 2024-07-29 14:50:17

ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 解决办法的相关文章

ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory

情景:在python中使用mysql 已知: [[email protected] muahao03]# pip list Django (1.7.1) MySQL-python (1.2.5) pip (1.5.6) pysqlite (2.6.3) setuptools (8.2.1) wsgiref (0.1.2) 已经安装 MySQL-python 报错: ImportError: libmysqlclient.so.18: cannot open shared object file:

Nagios显示器mysql定从库: libmysqlclient.so.18: cannot open shared object file: No such

做mysql的slave时间监控,必须check_mysql文字,check当误差: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory 1,错误信息例如以下:[[email protected] ~]# /usr/local/nagios/libexec/check_mysql -uadmin -P3306 -S

sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file

安装编译完后sysbench后,报错. 报错信息: [[email protected] dongbo]# sysbench -v sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory 解决方法: 1. [[email protected] dongbo]# ls -l /usr/local/my

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

启动zabbix_server出现如题错误,差点没晕死过去,从前一直没出现,这种错误其实工作上已经遇到过无数次了,但是每次的没有好好记录总结一些,导致每次遇到都需要傻乎乎的跑到网上->百度,方可解决.今天特地针对这个小问题写一篇错误记录博客,日后遇到方可快速查看. 执行命令 cd /usr/local/mysql/lib/ ll libmysqlclient.so 发现有  libmysqlclient.so -> libmysqlclient.so.18 于是 ln -s /usr/loca

The method assertEquals(Object, Object) is ambiguous for the type Assert解决办法

该错误意思是方法调用存在歧义,先看下面这个例子: assertEquals(10L, (Long)10); 编译器就会报出The method assertEquals(Object, Object) is ambiguous for the type Assert的错误: 10L是long型,而(Long)10是Long型.而assertEquals()是一个重载的方法,其中就有 assertEquals(Object,Object) assertEquals(Long, Long) 那么问题

php: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No

解决方法: 1.进入mysql安装目录查看,确认有libmysqlclient.so.16.0.0 文件, 于是需要在/usr/lib目录下建立一个软链接来指向libmysqlclient.so.16 2.在php lib目录下下建立个软链接:(格式为:ln -s mysql lib路径  php lib路径) ln -s /home/openpf/app/mysql-5.1.56-2/lib/mysql/libmysqlclient.so.16  /home/openpf/app/php-5.

ImportError: libxml2.so.2: cannot open shared object file: No such file or directory

此错的解决方法就是下载libxml2.so.2 RPM安装:#rpm -ivh libxml2-2.6.26.....rpm

PyCharm ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory 解决办法

libmysqlclient.so.20 错误问题解决

问题一:安装 MySQL-python 提示:ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 问题二:运行django已安装了mysqlclient,却依然报错: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient.so.20: ca