报错信息:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
报错原因:
找不到libmysqlclient.18.dylib这个文件,但这个文件在/usr/local/MySQL/lib/下是有的, 只是位置不对,于是我们这样解决.
执行命令:
- 1
- 1
结果提示:
- 1
- 1
原因:
The computer security settings prevent the shared library _mysql.so from using a relative reference to the library libmysqlclient.18.dylib. In the future, the shared library _mysql.so may be updated. Until then, you can force it to use an absolute reference via the install_name_toolutility. Assuming that libmysqlclient.18.dylib is in /usr/local/mysql/lib/, then run the command
解决办法:
sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /Users/Victoria/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-macosx-10.6-x86_64.egg/_mysql.so