[编辑] 当我对我的开发环境进行故障排除时,我注意到我的问题之一是对 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?
发布评论
评论(13)
在 10.8 上,我解决了这个问题:
如果您不知道brew是什么,请访问 https://github.com/ mxcl/homebrew 及其 wiki。
On 10.8 I solved this issue with:
If you don't know what brew is, visit https://github.com/mxcl/homebrew and its wiki.
为我工作
worked for me
我也使用自制程序来安装软件包,但在将 OSX 10.8 升级到 10.9 (Mavericks) 后,imagemagick 停止工作。我必须执行以下步骤:
为什么使用
--build-from-source
?对我来说,单独运行brew install imagemagick
来安装预构建的二进制文件是不够的;它修复了原来的“dyln”错误,但被替换为: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:
Why the
--build-from-source
? Well for me runningbrew install imagemagick
on its own to install the pre-built binary wasn't sufficient; it fixed the original 'dyln' error but was replaced with:我还升级到了 Lion,但丢失了 ImageMagick,尽管我遇到了不同的错误。我发现了 Lion 发行版 在 imagemagick.org 上。不太喜欢 DYLD_LIBRARY_PATH 环境变量,但它确实有效。好吧,从头开始。我刚刚下载了 ImageMagick 源并重新编译:
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:
在 Mountain Lion OSX 上,
即使使用更新的 imagemagick 酿造(其中包括 libtool),这个错误似乎也发生在我身上。
所以我使用以下命令修复了它
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
对于其他看起来仍然遇到麻烦的人,我使用了这个:
https://github.com/maddox/magick-installer
For others looking and still having trouble, I used this:
https://github.com/maddox/magick-installer
在 10.8 上,我用brew解决了这个问题:
对于googlers:如果您碰巧事先用brew安装了它,则需要在再次安装之前运行
brew uninstallgraphicsmagick
来重新安装。简单的。On 10.8, with brew, I solved this issue with:
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.这对我从时间机器恢复 OS X 10.9.3 后有所帮助。
This helped me after restoring OS X 10.9.3 from time machine.
OSX Mountain Lion(预览版 4)也可能会出现同样的问题。我必须单独配置某些部分,因为存在一些库不兼容:
我必须添加
--with-fontconfig=no
、--with-lzma=no
并使用 <对于 Ghostscript 字体,使用 code>/opt/local/share/... 而不是/usr/local/share/...
:The same problem might occur with OSX Mountain Lion (preview 4). I had to configure some parts separately because there are some library incompatibilities:
I had to add
--with-fontconfig=no
,--with-lzma=no
and use/opt/local/share/...
instead of/usr/local/share/...
for the ghostscript fonts:我可以通过从 cactuslab 站点 安装相应的软件包来解决 ImageMagick 问题。
然后通过在终端中设置
PATH
变量:I could fix the ImageMagick problem by installing corresponding package from cactuslab site.
Then by setting the
PATH
variables in terminal:如果您使用 Homebrew,请尝试以下命令:
诊断常见问题。
其中之一可能是从 ~/.profile 中删除 DYLD_FALLBACK_LIBRARY_PATH 变量(如果有的话)。
或者您必须通过以下方式重新安装 libtool:
If you're using Homebrew, try the following command:
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:
我尝试了上面的大部分解决方案,但它们都不起作用。以下是我解决问题的方法:
在 OS X 10.7.2 上测试
I tried most of the solutions above and they didn't work. Here's how I fixed my problem:
Tested on OS X 10.7.2
对于 10.7.8 及更高版本,您必须安装 php 版本而不是 pecl 版本。根据您使用 Macports 安装的 php 版本,您可以执行以下任一操作:
请记住仅执行当前 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:
Remember only to do the one of your current version of php.