ImageMagick 和 OS X Lion 的麻烦

发布于 2024-12-04 14:39:09 字数 1283 浏览 6 评论 0 原文

[编辑] 当我对我的开发环境进行故障排除时,我注意到我的问题之一是对 ImageMagick 的依赖,因为它是我的应用程序的重要组成部分。


升级到 OS X Lion (10.7) 后,我不再有 ImageMagick 可用,然后我尝试使用 MacPorts 再次安装,但没有成功,然后我从源代码安装,安装不太成功,我进行了转换和识别,但它输出错误消息不幸的是我不再拥有了,出于某种奇怪的原因,我决定删除所有 MacPort 库并开始使用 Homebrew,我尝试安装 ImageMagick,它安装正常,但是当我尝试使用它时会抛出此错误,

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

我在网上阅读,但我没有关于这里发生的事情的线索,我发现 libltdl 被称为 libtool,并且我显然需要将其升级到较新的版本,但我还没有找到任何关于如何或在哪里找到源代码的指示,或者是否应该已经是由自制程序处理以及为什么没有处理。

我尝试使用 此安装程序脚本 https://github.com/masterkain/ImageMagick-sl< 从源代码再次安装 ImageMagick /a> 但当我尝试使用 Convert 时,它会抛出类似的错误。

$ 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

我可以做什么来解决我的问题?

[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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

不奢求什么 2024-12-11 14:39:09

在 10.8 上,我解决了这个问题:

brew install libtool --universal
brew link libtool

如果您不知道brew是什么,请访问 https://github.com/ mxcl/homebrew 及其 wiki。

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.

魂ガ小子 2024-12-11 14:39:09
brew uninstall imagemagick
brew install imagemagick --build-from-source

为我工作

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

worked for me

清醇 2024-12-11 14:39:09

我也使用自制程序来安装软件包,但在将 OSX 10.8 升级到 10.9 (Mavericks) 后,imagemagick 停止工作。我必须执行以下步骤:

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

为什么使用 --build-from-source?对我来说,单独运行 brew install imagemagick 来安装预构建的二进制文件是不够的;它修复了原来的“dyln”错误,但被替换为:

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

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
十年九夏 2024-12-11 14:39:09

我还升级到了 Lion,但丢失了 ImageMagick,尽管我遇到了不同的错误。


我发现了 Lion 发行版 在 imagemagick.org 上。不太喜欢 DYLD_LIBRARY_PATH 环境变量,但它确实有效。

好吧,从头开始。我刚刚下载了 ImageMagick 源并重新编译:

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

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
吃素的狼 2024-12-11 14:39:09

在 Mountain Lion OSX 上,

即使使用更新的 imagemagick 酿造(其中包括 libtool),这个错误似乎也发生在我身上。

所以我使用以下命令修复了它

brew uninstall libtool
brew install libtool --universal
brew link libtool --force

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
勿忘初心 2024-12-11 14:39:09

对于其他看起来仍然遇到麻烦的人,我使用了这个:

https://github.com/maddox/magick-installer

For others looking and still having trouble, I used this:

https://github.com/maddox/magick-installer

红焚 2024-12-11 14:39:09

在 10.8 上,我用brew解决了这个问题:

brew install graphicsmagick

对于googlers:如果您碰巧事先用brew安装了它,则需要在再次安装之前运行brew uninstallgraphicsmagick来重新安装。简单的。

On 10.8, with brew, I solved this issue with:

brew install graphicsmagick

For the googlers: If you happened to have it installed with brew beforehand, you'll need to reinstall by running brew uninstall graphicsmagick before installing again. Easy.

风为裳 2024-12-11 14:39:09

这对我从时间机器恢复 OS X 10.9.3 后有所帮助。

brew uninstall imagemagick
brew uninstall libtool
brew install libtool --universal
brew unlink libtool && brew link libtool
brew install imagemagick
brew install Homebrew/python/pillow
brew link --overwrite pillow

This helped me after restoring OS X 10.9.3 from time machine.

brew uninstall imagemagick
brew uninstall libtool
brew install libtool --universal
brew unlink libtool && brew link libtool
brew install imagemagick
brew install Homebrew/python/pillow
brew link --overwrite pillow
在风中等你 2024-12-11 14:39:09

OSX Mountain Lion(预览版 4)也可能会出现同样的问题。我必须单独配置某些部分,因为存在一些库不兼容:

dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
  Referenced from: /usr/local/bin/convert
  Reason: Incompatible library version: convert requires version 13.0.0 or later, but libjpeg.8.dylib provides version 9.0.0

我必须添加 --with-fontconfig=no--with-lzma=no 并使用 <对于 Ghostscript 字体,使用 code>/opt/local/share/... 而不是 /usr/local/share/...

cd /tmp
curl -OL ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar -xzf ImageMagick.tar.gz
cd ImageMagick-6.7.8-0/
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp --with-fontconfig=no --with-gs-font-dir=/opt/local/share/ghostscript/fonts --with-lzma=no
make
sudo make install

The same problem might occur with OSX Mountain Lion (preview 4). I had to configure some parts separately because there are some library incompatibilities:

dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
  Referenced from: /usr/local/bin/convert
  Reason: Incompatible library version: convert requires version 13.0.0 or later, but libjpeg.8.dylib provides version 9.0.0

I had to add --with-fontconfig=no, --with-lzma=no and use /opt/local/share/... instead of /usr/local/share/... for the ghostscript fonts:

cd /tmp
curl -OL ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar -xzf ImageMagick.tar.gz
cd ImageMagick-6.7.8-0/
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp --with-fontconfig=no --with-gs-font-dir=/opt/local/share/ghostscript/fonts --with-lzma=no
make
sudo make install
﹎☆浅夏丿初晴 2024-12-11 14:39:09

我可以通过从 cactuslab 站点 安装相应的软件包来解决 ImageMagick 问题。

然后通过在终端中设置 PATH 变量:

export MAGICK_HOME="/usr/local/ImageMagick/"
export PATH="$MAGICK_HOME/bin:$PATH"
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/"

I could fix the ImageMagick problem by installing corresponding package from cactuslab site.

Then by setting the PATH variables in terminal:

export MAGICK_HOME="/usr/local/ImageMagick/"
export PATH="$MAGICK_HOME/bin:$PATH"
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/"
送你一个梦 2024-12-11 14:39:09

如果您使用 Homebrew,请尝试以下命令:

brew doctor

诊断常见问题。

其中之一可能是从 ~/.profile 中删除 DYLD_FALLBACK_LIBRARY_PATH 变量(如果有的话)。

或者您必须通过以下方式重新安装 libtool:

brew reinstall libtool --universal && brew unlink libtool && brew link libtool

If you're using Homebrew, try the following command:

brew doctor

to diagnose the common problems.

One of it could be to remove DYLD_FALLBACK_LIBRARY_PATH variable from your ~/.profile if you have it.

Or you have to re-install libtool by:

brew reinstall libtool --universal && brew unlink libtool && brew link libtool
野心澎湃 2024-12-11 14:39:09

我尝试了上面的大部分解决方案,但它们都不起作用。以下是我解决问题的方法:

brew install imagemagick;
brew install freetype;
cd /usr/X11/lib/;    
sudo mv libfreetype.6.dylib libfreetype.6.dylib.orig;
sudo ln -s /usr/local/opt/freetype/lib/libfreetype.6.dylib libfreetype.6.dylib

在 OS X 10.7.2 上测试

I tried most of the solutions above and they didn't work. Here's how I fixed my problem:

brew install imagemagick;
brew install freetype;
cd /usr/X11/lib/;    
sudo mv libfreetype.6.dylib libfreetype.6.dylib.orig;
sudo ln -s /usr/local/opt/freetype/lib/libfreetype.6.dylib libfreetype.6.dylib

Tested on OS X 10.7.2

喜你已久 2024-12-11 14:39:09

对于 10.7.8 及更高版本,您必须安装 php 版本而不是 pecl 版本。根据您使用 Macports 安装的 php 版本,您可以执行以下任一操作:

sudo port install php-imagick

sudo port install php5-imagick

sudo port install php53-imagick

sudo port install php54-imagick

请记住仅执行当前 php 版本之一。

For 10.7.8 and up, you have to install the php version and not the pecl version. Depending on your version of php you've install with Macports you can either do:

sudo port install php-imagick

sudo port install php5-imagick

sudo port install php53-imagick

sudo port install php54-imagick

Remember only to do the one of your current version of php.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文