I am trying to install a ruby gem, but the installation process is stopped, because:
ld: file not found: /usr/local/lib/libfreetype.6.dylib for architecture x86_
Gabriel F. Engel's answer almost worked for me. I had to do the following change:
brew install freetype
brew link --overwrite freetype
What library are you trying to install? Could it by chance be ImageMagick? Also, if it's a RubyGem, why is the post tagged with homebrew?
Anyways, I got this error when installing ImageMagick, you need to symlink /opt/X11/lib/libfreetype.6.dylib
to /usr/local/lib
.
do this:
ln -s /opt/X11/lib/libfreetype.6.dylib /usr/local/lib/libfreetype.6.dylib
Your compiler is trying to link to an lib at a location that doesn't have the lib, however it seems that you have installed it with homebrew.
Try running
ln -s /usr/local/Cellar/freetype/2.4.10/lib/libfreetype.6.dylib /usr/local/lib/libfreetype.6.dylib
to create one, or you can just use the without-freetype
flag to skip it.
If you're using brew, you can:
brew link --overwrite freetype