dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Update: As of December 2020 and beyond, brew switch
does not work, so use the other answer by @angabriel:
brew install rbenv/tap/openssl@1.0
ln -sfn /usr/local/Cellar/openssl@1.0/1.0.2t /usr/local/opt/openssl
Original Answer:
Switch to an older openssl package
brew switch openssl 1.0.2s
Or, depending on your exact system configuration, you may need to switch to a different version. Check the output of ls -al /usr/local/Cellar/openssl
for the version number to switch to.
brew switch openssl 1.0.2q
# or
brew switch openssl 1.0.2r
# or
brew switch openssl 1.0.2s
# or
brew switch openssl 1.0.2t
# etc...
dyld: Library not loaded ... Reason: Image not found
Find all the boost libraries (where exefile
is the name of your executable):
$ otool -L exefile
exefile:
@executable_path/libboost_something.dylib (compatibility version 0.7.0, current version 0.7.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 65.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
and for each libboost_xxx.dylib
, do:
$ install_name_tool -change @executable_path/libboost_something.dylib /opt/local/lib/libboost_something.dylib exefile
and finally verify using otool
again:
$ otool -L exefile
exefile:
/opt/local/lib/libboost_something.dylib (compatibility version 0.7.0, current version 0.7.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 65.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
Manpages: otool
install_name_tool
EDIT A while back I wrote a python script (copy_dylibs.py
) to work out all this stuff automatically when building an app. It will package up all libraries from /usr/local
or /opt/local
into the app bundle and fix references to those libraries to use @rpath
. This means you can easily install third-party library using Homebrew and package them just as easily.
I have now made this script public on github.
Upgrading to Ruby 2.1.3 on Mac OSx 10.9.5
So the solution, which resolved the issue is to run the following:
$ brew rm cloog; brew install cloog
Ta-Ta. It all worked all of the sudden!
$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
Could not open library 'vips.42'; Library not loaded: '@@HOMEBREW_PREFIX@@/opt/libpng/lib/libpng16.16.dylib'
On m1, homebrew puts binaries in /opt/homebrew/lib
and older versions of the ffi gem don't look there. If you update to ffi 1.15.3+ it will.
See:
https://github.com/libvips/ruby-vips/issues/284#issuecomment-1192157228
dyld: Library not loaded: /usr/local/lib/liblua.5.1.5.dylib
The problem seems to because homebrew
somehow removed the old version of lua
that was required for Vim
to run.
So installed the specific version from homebrew
like this:
Search
homebrew
for available formulae:brew search lua
; got:lua
lua51
luabind
luajit
luarocks
homebrew/nginx/lua-nginx-module- Installed:
brew install lua51
This solved the issue. I am posting it may be able solve other brew related issues connected with installing different versions of packages.
Related Topics
Script to Run Against Stdin If No Arg; Otherwise Input File =Argv[0]
Log Doesn't Work in Production with Delayed Job
Convert Array-Of-Hashes to a Hash-Of-Hashes, Indexed by an Attribute of the Hashes
How to Change Passenger Ruby Version Without Recompiling
Grouping Consecutive Numbers in an Array
Ruby Tcpsocket: Find Out How Much Data Is Available
Bitwise Operations on Strings with Ruby
Shorter Way to Pass Every Element of an Array to a Function
How to Use Us-Style Dates in Rails Using Ruby 1.9
Call Before Methods in Model on Ruby
How to Extend Redcarpet to Support Auto Linking User Mentions
Installing Ruby Gem Less-Rails on Windows MAChine Using Therubyracer
Ruby: How to Check If a String Contains Multiple Items
How to Delete a Range of Values from an Array
Sorting an Array by Two Values
Is This the Best Way to Grab Common Elements from a Hash of Arrays
How Get Best Performance Rails Requests Parallel Sidekiq Worker
How to Evaluate a Date Difference in Years, Months and Days (Ruby)