3

UPDATE: Solved with the solution here


I have spent the better part of my day trying to get ImageMagick to work with Grunt, with no luck. Grunt seems to be okay, but ImageMagick not so much, even though I've run the test on ImageMagick.org to make sure that it's installed correctly (I used HomeBrew for the install).

I get this error when trying to run a task:

 Warning: Command failed: identify: unable to load module
 '/usr/local/Cellar/imagemagick/6.9.2-4/lib/ImageMagick//modules-
 Q16/coders/jpeg.la': file not found @ error/module.c/OpenModule/1300.
 identify: no decode delegate for this image format 'JPEG' @
 error/constitute.c/ReadImage/501.

I've tried the solutions here and here, but none of them have helped.

(FYI I'm new to using the command line.)

Help?

Community
  • 1
  • 1
shainanigans
  • 872
  • 1
  • 6
  • 17
  • Try running `identify -version` at the command line and see which image formats you have got support for. Try also `brew install librsvg libtiff jpeg` – Mark Setchell Oct 23 '15 at 07:56
  • Running `identify -version` produced a similar message: `dyld: Library not loaded: /opt/X11/lib/libfreetype.6.dylib Referenced from: /opt/ImageMagick/bin/identify Reason: Incompatible library version: identify requires version 18.0.0 or later, but libfreetype.6.dylib provides version 17.0.0 Trace/BPT trap: 5`. Tried your second idea, then tried to run my task, got the same error as before. – shainanigans Oct 23 '15 at 22:21

1 Answers1

1

As with any homebrew problem, I would suggest you run

brew doctor

first, to try and sort things out. It is an excellent diagnosis tool.

Now, to your specific problem... mmmm... the /opt/X11 part of your error message worries me because homebrew installs in /usr/local/bin and /usr/local/Cellar so your ImageMagick should not be looking anywhere in /opt at all. I guess you have installed freetype via MacPorts or some method other than homebrew.

I would suggest you install the freetype stuff using homebrew, i.e.

brew install freetype

Then I would suggest uninstalling any other freetype stuff you have installed any other way. Finally, I would suggest you check your PATH environment variable and make it point to /usr/local/bin before anything in /opt. You will need to log out and back in for the new PATH to take effect - you can check your PATH like this:

echo $PATH

and change it by editing $HOME/.profile if you need to.

The homebrew version of freetype provides version 19 of the library and is therefore compatible with the homebrew ImageMagick version.

Also, I am a little disconcerted by the X11 part in your error message - modern Macs don't really use X11 any more and it doesn't ship with OSX. Let's see if the above ideas sort you out before worrying about that too much though - unless you know, and can say for sure, that you need X11.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432