2010-09-24

Macports - After installing git-core, all packages depends on libssl breaks

Git is popular. Is like LinkedIn to working professionals and GitHub to programmers.




Before I'm able to play around git on my mac, "git-core" need to be installed first, through macports. As usual, installing port from macports is as easy as :
port -v selfupdate
port -v install git-core

After the installation, time to try git. When issue the command "git", it return an error message :
dyld: Library not loaded: /opt/local/lib/libssl.0.9.8.dylib
Referenced from: /opt/local/bin/git
Reason: image not found
Trace/BPT trap

In fact, all my other programs that installed through macports are having problem.
e.g.
Executing "svn" also return the same error :
dyld: Library not loaded: /opt/local/lib/libssl.0.9.8.dylib
Referenced from: /opt/local/bin/svn
Reason: image not found
Trace/BPT trap

Looking at the error message, my guts tells me that libssl has problem working with these programs. After messing around with the OpenSSL port, here's the solution :

  1. Find out the latest working OpenSSL package that works
    port installed openssl*
  2. Disable the current OpenSSL package, which is "openssl @1.0.0a_0"
    port deactivate openssl
  3. Enable the the previous OpenSSL version, in my case is "openssl @0.9.8n_0+darwin"
    port activate openssl@0.9.8n_0+darwin

Test out the programs previously that return error, all are working fine now.

Nemaste !!!

4 comments:

Matthias said...

THANKS!

Marius said...

Thanks, this was just what I needed to fix my md5sum and other openssl binary woes.

Marius said...

This only works as long as you can stick to packages that can live with the older openssl. Here's an alternative solution that lets you stay on the freshest openssl version:
1. reactivate the current openssl: port activate openssl@1.0.0c_0 (or whatever)
2. clean up your old unwanted versions of everything: port uninstall inactive
3. uninstall badly behaved ports: port uninstall md5sha1sum subversion neon
4. get them back: port install subversion md5sha1sum

Bill said...

THANKS!! I ran into the same problem, Googled it, found your page, and used your solution, with minor adaptations. It worked. You rock.