ImageMagick and OS X Lion trouble
Solution 1
I also upgraded to Lion and lost ImageMagick, although i'm getting different errors.
i found a Lion distribution on imagemagick.org. not a big fan of the DYLD_LIBRARY_PATH environment variable but it works.
ok scratch that. i just downloaded the ImageMagick source and re-compiled:
cd /tmp
curl -OL ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar -xzf ImageMagick.tar.gz
cd ImageMagick-6.7.2-7/
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp --with-gs-font-dir=/usr/local/share/ghostscript/fonts
make
sudo make install
Solution 2
On 10.8 I solved this issue with:
brew install libtool --universal
brew link libtool
If you don't know what brew is, visit https://github.com/mxcl/homebrew and its wiki.
Solution 3
brew uninstall imagemagick
brew install imagemagick --build-from-source
worked for me
Solution 4
I too use homebrew for installing packages but imagemagick stopped working after upgrading OSX 10.8 to 10.9 (Mavericks). I had to do the following steps:
brew uninstall imagemagick
brew uninstall libtool
brew install libtool --universal
brew install imagemagick --build-from-source
Why the --build-from-source
? Well for me running brew install imagemagick
on its own to install the pre-built binary wasn't sufficient; it fixed the original 'dyln' error but was replaced with:
unable to load module `/usr/local/Cellar/imagemagick/6.8.7-7/lib/ImageMagick//modules-Q16/coders/png.la': file not found @ error/module.c/OpenModule/1277
Solution 5
On Mountain Lion OSX,
Even with the updated brew for imagemagick(which includes libtool), this error seemed to happen to me.
so i fixed it using the following commands
brew uninstall libtool
brew install libtool --universal
brew link libtool --force
rroche
Experienced software engineer lead, often a firefighter on special missions to save projects from impending doom. I've worn many hats in my career -- Software Engineer, Systems Architect, Tools developer, DevOps, Team Lead, Team manager. As a result I have a unique ability to manage multidisciplinary projects and to navigate complex challenges: I know how to ship a product I thrive in a multi-disciplinary environment I can effectively communicate with marketing, leadership team and my peers. I breathe strategy I'm also an individual contributor I'm always open for a friendly chat about drones, tech, soccer or music, feel free to connect.
Updated on July 05, 2022Comments
-
rroche almost 2 years
[edit] I was troubleshooting problems with my development environment when I noticed one of my problems was the dependency on ImageMagick, since it's a vital part of my app.
After upgrading to OS X Lion (10.7) i no longer had ImageMagick available, i then tried installing again using MacPorts without success, i then installed from source, and the install wasn't very successfully i had convert and identify but it output error messages that i unfortunately dont have anymore, i by some strange reason decided to remove all of my MacPort libraries and started using Homebrew, i tried installing ImageMagick, it installs OK but when i try to use it throws this error
dyld: Library not loaded: /opt/local/lib/libltdl.7.dylib Referenced from: /usr/local/bin/convert Reason: Incompatible library version: convert requires version 11.0.0 or later, but libltdl.7.dylib provides version 10.0.0 Trace/BPT trap: 5
I read online but i have no clue on whats going on here, i found that libltdl is called libtool, and that i obviously need to upgrade it to a newer version, but i havent found any indication of how or where to find the source, or if this should be already be handled by homebrew and why it hasn't.
I tried installing ImageMagick again from source using this installer script https://github.com/masterkain/ImageMagick-sl but when i try to use convert it throws a similar error.
$ convert gnome.jpg -resize 50% gnome_.jpg dyld: Library not loaded: /opt/local/lib/libltdl.7.dylib Referenced from: /usr/local/bin/convert Reason: Incompatible library version: convert requires version 11.0.0 or later, but libltdl.7.dylib provides version 10.0.0 Trace/BPT trap: 5 $ which convert /usr/local/bin/convert
What can i do to solve my problem?
-
Admin almost 12 yearsDon't forget to install xquartz.macosforge.org/landing as well. And you're good to go
-
rroche over 11 yearsmaybe we should start comparing our brew installed libs
-
Olivier Lalonde over 11 yearsHere's the error message I was getting by the way: syskall.com/trouble-installing-imagemagick-on-os-x-1072 . Hope this fix works for someone else!
-
Rider_X over 11 yearsHowdy I tried this on a fresh Mountain lion install and it fails at the configuration stage
configure: error: libltdl is required for modules build
. I am relatively new to compiling and installing binaries from source, can you provide a suggested best method to installing the requiredlibltdl
library? -
firien over 11 yearsI had originally used the install script mentioned by @rroche on my snow leopard install. After the Lion upgrade i was able to use the code above because i had all the library dependencies installed already. The above code will NOT work on a fresh install.
-
firien over 11 yearsthe script mentioned by @23inhouse appears to work on mountain lion
-
Rider_X over 11 yearsI ended up installing the command line tools from Xcode, which seems to install a relatively recent version of ImageMagick.
-
chris Frisina over 11 yearsThis doesnt play as nice with homebrew, as linkingvia
brew link
is done. Manual links might/may/likely willl need to be done afterwards for complete access -
Simon Perepelitsa over 11 yearsWorked for me without linking.
-
LevB over 11 years@user192411, because ImageMagick require libtool to be compiled.
-
lhunath over 11 yearsJust
brew install libtool
appears to works just as well... Why the--universal
and manuallink
call afterwards? -
bernstein over 11 yearsthis is not necessary just do a
brew install libtool
(since the precompiled imagemagick misses to download this dependency) -
Drew about 11 yearsThis worked for me, though I had to do a
brew link libtool --force
since it was bitching about Keg-only installations.brew doctor
also bitches about libtool. What's that about? -
SJP about 11 yearsThis worked for me too, thanks. even the brew install libtool was not working.
-
arun15thmay about 11 yearsuniversal gives a single binary file which can be used for both 32bit and 64bit architectures. I think this is needed for Imagemagick to work.
-
glerYbo almost 11 yearsTo reinstall:
brew reinstall libtool --universal && brew unlink libtool && brew link libtool
-
fregas about 10 yearsI was getting this error with PNGs despite having libpng installed. Just doing the --build-from-source fixed it. :)
-
thewoolleyman about 10 yearssee kenorb's answer: After mavericks upgrade you have to uninstall/reinstall libtool, even if the latest version is already installed.
-
Alan Thompson almost 10 yearsSaved my build of octave. I also had to do
brew unlink libtool && brew link libtool
,brew uninstall imagemagick
, brew install imagemagick --build-from-source, then
brew link --overwrite imagemagick` -
Meekohi almost 10 yearsreinstalling libtool did not help me, but this worked.
-
Jonik over 9 yearsWorked for me on Mavericks (10.9.3).
-
Pedro over 9 yearsI think all you need is to relink the packages. See this answer for a suggestion: apple.stackexchange.com/questions/123900/…
-
sholsinger over 9 yearsI had to uninstall both imagemagick and libtool and reinstall libtool with the --universal flag then install imagemagick again.
-
typeoneerror over 9 yearsholy, you just solved me so much headache! currently this is the correct answer.
-
marman about 9 yearsThanks dude brew doctor was the answer, I actually have other libraries being link.
-
michele b over 8 yearsand on El Capitan (10.11). I additionally needed to
chown -R myusername
a few folders (/usr/local/bin
,/usr/local/share
,/usr/local/etc
), and replace the last line withbrew unlink pillow && brew link pillow
. Thanks a ton! -
Gerold Meisinger almost 8 yearsI had
DYLD_LIBRARY_PATH
exported from a previous manual installation which confused the brew installation. Close all terminals and retry.