简体   繁体   English

使用ImageMagick遇到麻烦-通过自制软件安装

[英]Trouble Using ImageMagick - Installed Thru Homebrew

I installed ImageMagick thru Homebrew successfully - so it seems, anyways - but when I tested it thru Perl using 我通过Homebrew成功安装了ImageMagick-无论如何-似乎如此,但是当我使用Perl通过Perl测试时

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. 我做了一些研究,当通过Homebrew安装ImageMagick时,默认情况下显然不支持Perl,因此我尝试安装PerlMagick(用于Perl的ImageMagick API)。 I used the following commands after downloading the source: 下载源代码后,我使用了以下命令:

  • cd Documents/PerlMagick-6.88 cd文件/PerlMagick-6.88
  • perl Makefile.PL perl Makefile.PL
  • make 使
  • sudo make install 须藤使安装

So I thought that I successfully installed PerlMagick, yet it didn't change my situation in the slightest. 因此,我认为我已经成功安装了PerlMagick,但丝毫没有改变我的情况。 I'm new to ImageMagick and Homebrew (just converted from Macports), so I may be doing something completely wrong here. 我是ImageMagick和Homebrew(刚从Macports转换而来)的新手,所以我可能在这里做错了什么。

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? 错误?

You don't need to install PerlMagick manually since using Homebrew to install ImageMagick. 您不需要手动安装PerlMagick ,因为使用Homebrew来安装ImageMagick。

Try this: 尝试这个:

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

Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM