License: Attribution-NonCommercial-ShareAlike 4.0 International
本文出自 Suzf Blog。 如未注明,均为 SUZF.NET 原创。
转载请注明:http://suzf.net/post/430
MySQL-python (1.2.5) >>> import MySQLdb Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/Python2.7.3/lib/python2.7/site-packages/MySQLdb/__init__.py", line 19, in <module> import _mysql ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
I.创建软连接 再次导入模块正常
[21:21:01][[email protected] ~]#ln -s /usr/local/mysql-5.6.26/lib/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18 >>> import MySQLdb >>>