Pol
Pol

Reputation: 25535

libmysqlclient_r.18.dylib disaphere from /usr/local/mysql/lib/ MacOS

I did brew remove mysql. After, i reinstall mysql from dmg again. But now i cant run my django project. It shows me:

ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/polinom/workspace/agents/eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/_mysql.so, 2): Library not loaded: /usr/local/lib/libmysqlclient.18.dylib
  Referenced from: /Users/polinom/workspace/agents/eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/_mysql.so
  Reason: image not found

This does not help: sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/lib/libmysqlclient.18.dylib

And this does not help: export DLYD_LIBRARY_PATH=/usr/local/mysql/lib

I figured out that there is no file /usr/local/lib/libmysqlclient.18.dylib. Even here it is absent /usr/local/mysql/lib/. The only libs that sit in that folder is:

libmysqlclient.15.dylib    libmysqlclient_r.15.dylib  libndbclient.2.dylib       libndbclient.la
libmysqlclient.dylib       libmysqlclient_r.dylib     libndbclient.dylib

What do i do about that?

Upvotes: 1

Views: 1003

Answers (1)

Murph
Murph

Reputation: 520

If you installed from a DMG this time, try looking in /usr/local/ for a file like

mysql-5.5.24-osx10.6-x86_64

If you have that version or newer, libmysqlclient.18.dylib will be in there, and you just need to make sure that your symlink to /usr/local/mysql is correctly linking to that version. You may also have to add it to your path, the DMG installer did a horrible job of setting that stuff up for me.

If you have an earlier version than the one above, you may need to grab a newer copy of the DMG and reinstall. Hope this helps!

Upvotes: 1

Related Questions