Reputation: 48453
If I run some kind of rake
command, I get this error message:
rake aborted!
dlopen(/Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/RMagick2.bundle, 9): Library not loaded: /usr/local/lib/libfreetype.6.dylib
Referenced from: /usr/local/lib/libMagickCore-Q16.7.dylib
Reason: Incompatible library version: libMagickCore-Q16.7.dylib requires version 16.0.0 or later, but libfreetype.6.dylib provides version 13.0.0 - /Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/rmagick-2.13.1/lib/RMagick2.bundle
...
I am running on RoR 3.2, OSX Lion.
Could anyone help me, please, how to fix this issue? I spent 2 days of googling, reading discussions, but unfortunately with zero success...
Thank you so much!
Upvotes: 3
Views: 4093
Reputation: 8429
Do you use something like Homebrew
or MacPorts
to manage external library dependencies?
Installing the imagemagick
library from there and then install rmagick.
Upvotes: 0
Reputation: 573
Using Homebrew I was able to solve it using the following commands:
brew uninstall freetype
brew update
brew install freetype
Update step might be unnecessary. The installation succeeded but with the following warning:
Warning: Could not link freetype. Unlinking...
So one final command:
brew link --overwrite freetype
Upvotes: 11
Reputation: 256
I have an amazing how-to-install-rmagick that have been working beautifully for me, try to re-install ImageMagick following these steps:
yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel -y
(I use CentOS, you can translate the commands to your distro)wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
and press Enter. ImageMagick.tar.gz is created in the current directory.tar xczf ImageMagick.tar.gz
and press Enter. A new directory, ImageMagick-version, where version is the ImageMagick version number, is created../configure --prefix=/usr/local --without-perl
and press Enter.make
and press Enter. ImageMagick compiles. This step may take several minutes.make install
and press Enter.rm -r ImageMagick.tar.gz
and press Enter.echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile
and press Enter.source ~/.bash_profile
and press Enter.export LD_LIBRARY_PATH=/usr/local/lib
and press Enter.export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
and press Enter.Tell me later how it goes.
Upvotes: 2
Reputation: 1768
I found the answer in another post:
Rails 3 - RMagick doesn't find libfreetype.6.dylib using Paperclip
I performed the search and found that there was an older version of libfreetype that was being referenced and newer versions hidden elsewhere. By copying/linking the newer versions into the appropriate directory (/usr/local/lib in my case) the problem was resolved.
Upvotes: 0