ImageMagick and OS X Lion trouble

53,939

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
Share:
53,939
rroche
Author by

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, 2022

Comments

  • rroche
    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
    Admin almost 12 years
    Don't forget to install xquartz.macosforge.org/landing as well. And you're good to go
  • rroche
    rroche over 11 years
    maybe we should start comparing our brew installed libs
  • Olivier Lalonde
    Olivier Lalonde over 11 years
    Here'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
    Rider_X over 11 years
    Howdy 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 required libltdl library?
  • firien
    firien over 11 years
    I 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
    firien over 11 years
    the script mentioned by @23inhouse appears to work on mountain lion
  • Rider_X
    Rider_X over 11 years
    I ended up installing the command line tools from Xcode, which seems to install a relatively recent version of ImageMagick.
  • chris Frisina
    chris Frisina over 11 years
    This 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
    Simon Perepelitsa over 11 years
    Worked for me without linking.
  • LevB
    LevB over 11 years
    @user192411, because ImageMagick require libtool to be compiled.
  • lhunath
    lhunath over 11 years
    Just brew install libtool appears to works just as well... Why the --universal and manual link call afterwards?
  • bernstein
    bernstein over 11 years
    this is not necessary just do a brew install libtool (since the precompiled imagemagick misses to download this dependency)
  • Drew
    Drew about 11 years
    This 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
    SJP about 11 years
    This worked for me too, thanks. even the brew install libtool was not working.
  • arun15thmay
    arun15thmay about 11 years
    universal 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
    glerYbo almost 11 years
    To reinstall: brew reinstall libtool --universal && brew unlink libtool && brew link libtool
  • fregas
    fregas about 10 years
    I was getting this error with PNGs despite having libpng installed. Just doing the --build-from-source fixed it. :)
  • thewoolleyman
    thewoolleyman about 10 years
    see kenorb's answer: After mavericks upgrade you have to uninstall/reinstall libtool, even if the latest version is already installed.
  • Alan Thompson
    Alan Thompson almost 10 years
    Saved 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
    Meekohi almost 10 years
    reinstalling libtool did not help me, but this worked.
  • Jonik
    Jonik over 9 years
    Worked for me on Mavericks (10.9.3).
  • Pedro
    Pedro over 9 years
    I think all you need is to relink the packages. See this answer for a suggestion: apple.stackexchange.com/questions/123900/…
  • sholsinger
    sholsinger over 9 years
    I had to uninstall both imagemagick and libtool and reinstall libtool with the --universal flag then install imagemagick again.
  • typeoneerror
    typeoneerror over 9 years
    holy, you just solved me so much headache! currently this is the correct answer.
  • marman
    marman about 9 years
    Thanks dude brew doctor was the answer, I actually have other libraries being link.
  • michele b
    michele b over 8 years
    and 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 with brew unlink pillow && brew link pillow. Thanks a ton!
  • Gerold Meisinger
    Gerold Meisinger almost 8 years
    I had DYLD_LIBRARY_PATH exported from a previous manual installation which confused the brew installation. Close all terminals and retry.