I had the same problem. I am trying to make this work on a multi-user 
machine. My two options seem to be

(1) Add this line to /etc/profile:

export DYLD_LIBRARY_PATH=/Library/PostgreSQL/9.3/lib

The disadvantage of this is that changing DYLD_LIBRARY_PATH doesn't seem to 
be a common technique on Macs, and I'm not sure whether this would run if 
python is being used by some specialized account (rather than a normal 
login account).

(2) Create symbolic links in /usr/lib :

sudo ln -s /Library/PostgreSQL/9.3/lib/libpq.5.dylib /usr/lib/libpq.5.dylib
sudo ln -s /Library/PostgreSQL/9.3/lib/libssl.1.0.0.dylib 
/usr/lib/libssl.1.0.0.dylib
sudo ln -s /Library/PostgreSQL/9.3/lib/libcrypto.1.0.0.dylib 
/usr/lib/libcrypto.1.0.0.dylib
(It may also have been possible to place these symbolic links 
in /Library/Python/2.6/site-packages/psycopg2/ , next to _psycopg.so .)

The disadvantage of using these symbolic links is that it will be harder to 
maintain when I switch to a new version of PostgreSQL. It was also tedious 
to find the list of missing dylibs by trial and error (in retrospect, I 
could have used otools 
-l /Library/Python/2.6/site-packages/psycopg2/_psycopg.so to get a full 
list of the libraries needed for psycopg2).

I would still like to find the "normal" way to add the 
whole /Library/PostgreSQL/9.3/lib/ directory to the Mac's dynamic library 
search path, especially for a multi-user machine. Installing PostgreSQL via 
HomeBrew instead of EnterpriseDB might take care of this automatically?

Matthias

On Monday, October 28, 2013 9:54:05 AM UTC-10, Skip Montanaro wrote:
>
> > I just had this exact same problem and it took me a while to find the 
> > solution. 
> > 
> > On OSx there is a separate library path variable for .dylib library 
> files. I 
> > added the following to my .bashrc (or.bash_env or however you set up 
> your 
> > shell environment). 
> > 
> > export 
> > 
> DYLD_LIBRARY_PATH="/usr/local/Cellar/openssl/1.0.1e/lib/:$DYLD_LIBRARY_PATH" 
>
>
> Thanks for the suggestion. Found libssl in the PostgreSQL installation: 
>
> % find / -name libssl.1.0.0.dylib 2>/dev/null 
> /Library/PostgreSQL/9.2/lib/libssl.1.0.0.dylib 
> /Library/PostgreSQL/9.2/pgAdmin3.app/Contents/Frameworks/libssl.1.0.0.dylib 
>
>
> I guess that makes sense. I should be able to modify the activate 
> script and deactivate function to set/reset DYLD_LIBRARY_PATH 
> appropriately. 
>
> Skip 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f914348c-462d-4c86-9fc1-0212e02e4c3b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to