title: Libssl and libcrypto causing dyld: Library not loaded: /usr/lib/libpq.5.dylib
body: <p>I recently uninstalled postgresql and installed pyscopg2 via pip.</p>
  
  <p>I know there's some trickery involved with libcrypto and libssl</p>
  
  <p>Currently i have them symlinked to:</p>
  
  <pre><code>$ ls -lah libssl.*
  -rwxr-xr-x  1 root  wheel   402K Aug 28 11:06 libssl.0.9.7.dylib
  -rwxr-xr-x  1 root  wheel   589K Aug 28 11:06 libssl.0.9.8.dylib
  lrwxr-xr-x  1 root  wheel    55B Nov 29 23:38 libssl.1.0.0.dylib -&gt; /usr/local/Cellar/openssl/1.0.1c/lib/libssl.1.0.0.dylib
  lrwxr-xr-x  1 root  wheel    55B Nov 30 02:25 libssl.dylib -&gt; /usr/local/Cellar/openssl/1.0.1c/lib/libssl.1.0.0.dylib
  
  /usr/lib
  $ ls -lah libcrypto.*
  -rwxr-xr-x  1 root  wheel   2.1M Aug 28 11:06 libcrypto.0.9.7.dylib
  -rwxr-xr-x  1 root  wheel   2.6M Aug 28 11:06 libcrypto.0.9.8.dylib
  -r-xr-xr-x  1 root  wheel   1.6M Oct 31 22:12 libcrypto.1.0.0.dylib
  lrwxr-xr-x  1 root  wheel    58B Nov 30 02:27 libcrypto.dylib -&gt; /usr/local/Cellar/openssl/1.0.1c/lib/libcrypto.1.0.0.dylib
  </code></pre>
  
  <p>whereby I installed openssl via ports</p>
  
  <p>Now when I run arc diff, I am getting the infamous</p>
  
  <pre><code>$ arc diff
  dyld: Library not loaded: /usr/lib/libpq.5.dylib
    Referenced from: /usr/bin/php
    Reason: image not found
  Trace/BPT trap: 5
  </code></pre>
  
  <p>There are a few answers here in SO which talks about symlinking these libs to the postgresql install directory. Obviously, this won't work for me. </p>
  
  <p>What should I do? </p>