Dominic Mercier
Dominic Mercier

Reputation: 808

ImageMagick error

When trying to run ImageMagick via node-imagemagick on my Grunt task, i get this error from ImageMagick:

Warning: Command failed: identify: unable to load module /usr/local/Cellar/imagemagick/6.8.8-9/lib/ImageMagick//modules-Q16/coders/jpeg.la': file not found @ error/module.c/OpenModule/1275. identify: no decode delegate for this image formatinventaire/videos/OFF_Arrestation joueur_14_petit.jpg' @ error/constitute.c/ReadImage/501. Use --force to continue.

Why is ImageMagick trying to load JPG coder at /usr/local/Cellar/imagemagick/6.8.8-9/lib/ImageMagick//modules-Q16/coders/jpeg.la? Why the double slash after ImageMagick// ?

This grunt script run perfectly on OSX 10.8 and now fail on 10.9.2. Anyone know a way to fix it?

Upvotes: 22

Views: 19738

Answers (5)

Nakilon
Nakilon

Reputation: 35102

This worked for me:

brew uninstall imagemagick@6 
brew install imagemagick@6 
PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig gem install rmagick

Upvotes: 6

sbs
sbs

Reputation: 4152

OSX Mavericks seems break the link of jpeg lib. All you need to do is relink the jpeg, then reinstall imagemagick.

brew unlink jpeg
brew link jpeg

Then reinstall imagemagick from source

brew uninstall imagemagick
brew install imagemagick --build-from-source

Now you can check if jpeg is in the delegate

identify -list configure | grep DELEGATES

It should have jpeg now

DELEGATES bzlib mpeg freetype jng jpeg lcms lzma png tiff xml zlib

Upvotes: 17

emcconville
emcconville

Reputation: 24439

ImageMagick's module dependencies are out of date by the systems upgrade. You'll need to re-install homebrew packages. See this articles "Upgrading homebrew packages on OSX Mavericks", or "Install ImageMagicK on OSX Lion."

Why is ImageMagick trying to load JPG coder at /usr/local/Cellar/imagemagick/6.8.8-9/lib/ImageMagick//modules-Q16/coders/jpeg.la

ImageMagick is expecting a static library for JPEG. The module is simply not there, or unreadable.

Why the double slash after ImageMagick// ?

This is common with homebrew. It's safe, and will resolve to ImageMagick/.

... know a way to fix it?

Run the followin in Terminal.app

brew uninstall imagemagick
brew update
brew cleanup
brew doctor
brew install imagemagick

Upvotes: 3

9monkeys
9monkeys

Reputation: 1804

I came across this issue too when upgrading from Mt.Lion to Mavericks. I found an issue in homebrew's github repo. The fix that worked for me was:

$ brew uninstall imagemagick
$ brew install imagemagick --build-from-source

Upvotes: 24

rohitmishra
rohitmishra

Reputation: 8999

This is what finally worked for me after a bunch of installs and uninstalls. I removed and reinstalled imagemagick with these options

brew install imagemagick --with-fontconfig --with-ghostscript --with-libtiff --with-webp

I am only using jpeg and png for now, and am not sure how these options help, but worth a try.

Upvotes: 6

Related Questions