BrianAtUAB
BrianAtUAB

Reputation: 23

Trouble Using ImageMagick - Installed Thru Homebrew

I installed ImageMagick thru Homebrew successfully - so it seems, anyways - but when I tested it thru Perl using

perl -le 'use Image::Magick'

I received this error:

Cant load '/Library/Perl/5.12/darwin-thread-multi-2level/auto/Image/Magick/Magick.bundle'
for module Image::Magick: dlopen(/Library/Perl/5.12/darwin-thread-multi-2level/auto/Image/Magick/Magick.bundle, 
1): Library not loaded: /usr/local/lib/liblzma.5.dylib
  Referenced from: /usr/local/lib/libMagickCore-6.Q16.2.dylib
  Reason: image not found at /System/Library/Perl/5.12/darwin-thread-multi-2level/DynaLoader.pm line 204.
 at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
&Image::Magick::constant not defined. The required ImageMagick libraries are not installed or not installed properly.
END failed--call queue aborted at -e line 1.

I did some research, and apparently Perl is not supported by default when ImageMagick is installed through Homebrew, so I tried installing PerlMagick, the ImageMagick API for Perl. I used the following commands after downloading the source:

So I thought that I successfully installed PerlMagick, yet it didn't change my situation in the slightest. I'm new to ImageMagick and Homebrew (just converted from Macports), so I may be doing something completely wrong here.

Anyone have any idea how to resolve my situation? Specifically, what would be the cause of

Library not loaded: /usr/local/lib/liblzma.5.dylib

error?

Upvotes: 2

Views: 974

Answers (1)

edigu
edigu

Reputation: 10089

You don't need to install PerlMagick manually since using Homebrew to install ImageMagick.

Try this:

$ brew uninstall ImageMagick
$ brew install ImageMagick --with-perl

Hope it helps.

Upvotes: 5

Related Questions