2

I'm trying to install yajl-py () on my Mac. However, it gives the following error:

Yajl shared object cannot be found. Please install Yajl and confirm it is on your shared lib path.

I installed yajl via ports, so I know it's there, the question is how to get the shared lib in /opt/local/lib into the lib path.

Doing a bit of reading, seems like a bad idea to use LD_LIBRARY_PATH, but I don't see any alternatives. Is there an alternative way to do this?

Bialecki
  • 30,061
  • 36
  • 87
  • 109

1 Answers1

2

I'm not sure if this is the best solution (let me know if there are issues with it), but for now I symlinked the dylib file from /opt/local/lib to /user/local/lib using the following command:

sudo ln -s /opt/local/lib/libyajl.dylib /usr/local/lib/libyajl.dylib
Bialecki
  • 30,061
  • 36
  • 87
  • 109
  • 1
    yes this is one way ... also updating LD_LIBRARY_PATH should work and I do not see the problem with that, especially since you installed yajl in a non standard path. – Pykler May 15 '13 at 04:33
  • For those using homebrew: `sudo ln -s /opt/homebrew/opt/yajl/lib/libyajl.dylib /usr/local/lib/libyajl.dylib` – heiner Jun 15 '23 at 21:13