Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

homebrew - Brew doctor: dyld: Library not loaded & Error: No available formula for zlib

When I brew doctor I get the following errors:

dyld: Library not loaded: /usr/lib/libltdl.7.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
Error: No available formula for zlib

The file libltdl.7.dylib is not in my /usr/lib directory, but there are several other .dylib files.

I'm running 10.8.1 with the latest version of Xcode (4.4.1) and its Command Line Tools installed.

Any idea how to solve these errors?

question from:https://stackoverflow.com/questions/12323252/brew-doctor-dyld-library-not-loaded-error-no-available-formula-for-zlib

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try to re-install libtool by:

brew reinstall libtool --universal && brew unlink libtool && brew link libtool

If that doesn't help, try removing libtool completely, and then retry the steps above:

brew uninstall libtool

If it still doesn't work after trying the steps above, check to see if you have the DYLD_FALLBACK_LIBRARY_PATH variable defined somewhere on the system (e.g. ~/.profile) and try unsetting it before trying the steps above again.


Other commands which could be useful for identifying the issue:

$ libtool --version
$ whereis libtool
$ set | grep DYLD_FALLBACK_LIBRARY_PATH
$ echo $DYLD_FALLBACK_LIBRARY_PATH

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...