macos 安装 OS X Homebrew 时缺少 Imagemagick jpeg 解码委托
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5624778/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Imagemagick jpeg decode delegate missing with OS X Homebrew install
提问by MAP
I recently converted from macports to homebrew and my previous macports Imagemagick install was working fine. I followed the homebrew instructions to chown /usr/local (somewhat apprehensively) and remove /usr/local/include and /usr/local/lib. When trying to work with any jpeg images, imagemagick chokes with:
我最近从 macports 转换为自制软件,我之前的 macports Imagemagick 安装工作正常。我按照自制程序的说明 chown /usr/local(有点担心)并删除 /usr/local/include 和 /usr/local/lib。尝试处理任何 jpeg 图像时,imagemagick 会因:
no decode delegate for this image format
此图像格式没有解码委托
Here is a list of some relevant command output. As you can see, no jpeg/jpg delegate can be found.
这是一些相关命令输出的列表。如您所见,找不到 jpeg/jpg 委托。
convert -list configure
=>
DELEGATES bzlib freetype png x11 xml zlib
convert -list configure
=>
DELEGATES bzlib freetype png x11 xml zlib
identify -list configure
=> DELEGATES bzlib freetype png x11 xml zlib
identify -list configure
=> DELEGATES bzlib freetype png x11 xml zlib
However, jpeg lib was installed as part of the Imagemagick dependencies, so I'm not sure what's going on here.
但是,jpeg lib 是作为 Imagemagick 依赖项的一部分安装的,所以我不确定这里发生了什么。
brew list
=> imagemagick jasper jpeg libtiff little-cms nginx pcre
brew list
=> imagemagick jasper jpeg libtiff little-cms nginx pcre
brew doctor
=> Your OS X is ripe for brewing. Any troubles you may be experiencing are likely purely psychosomatic.
brew doctor
=> Your OS X is ripe for brewing. Any troubles you may be experiencing are likely purely psychosomatic.
identify --version
=> Version: ImageMagick 6.6.7-9 2011-04-06 Q16
identify --version
=> Version: ImageMagick 6.6.7-9 2011-04-06 Q16
Any ideas?
有任何想法吗?
回答by Jay Swain
Andrei, your solution got me in the right direction.
安德烈,你的解决方案让我朝着正确的方向前进。
but it was a
但这是一个
brew install --force jpeg
brew install --force imagemagick
that got it working for me.
这让它对我来说有效。
回答by Adam Presley
I just ran into this issue myself. While investigating I noticed symlinks to the jpeg jib were missing from /usr/local/lib. Can take of this with the following; just be sure to refer to the jpeg lib version in use, at the time of this post I am using 8c:
我自己刚刚遇到了这个问题。在调查时,我注意到 /usr/local/lib 中缺少指向 jpeg jib 的符号链接。可以通过以下方式解决这个问题;请务必参考正在使用的 jpeg lib 版本,在撰写本文时,我使用的是 8c:
ln -s /usr/local/Cellar/jpeg/8c/lib/libjpeg.8.dylib /usr/local/lib/libjpeg.8.dylib
ln -s /usr/local/Cellar/jpeg/8c/lib/libjpeg.a /usr/local/lib/libjpeg.a
Then force homebrew to reinstall imagemagick:
然后强制自制软件重新安装 imagemagick:
brew install --force imagemagick
Viola! Imagemagick will now show that a jpeg delegate is present.
中提琴!Imagemagick 现在将显示存在 jpeg 委托。
回答by ythdelmar
Thanks for the direction pointed. My jpeg is also already in the delegate list, re-installing imagemagick doesn't work for me, but relinking jpeg does:
谢谢你指出的方向。我的 jpeg 也已经在委托列表中,重新安装 imagemagick 对我不起作用,但重新链接 jpeg 可以:
brew unlink jpeg
brew link jpeg
回答by BaronVonKaneHoffen
I had this problem and it turned out to be permissions.
我遇到了这个问题,结果是权限问题。
sudo chown myuser:wheel /usr/local
then:
然后:
brew remove jpeg
brew remove imagemagick
brew install jpeg
brew install imagemagick
sorted it. Word of warning though: I had MySQL sittting in /usr/local/ too, and I inadvertently messed up permissions for that, so if you've got anything else important in there, be careful :-) Fixed that with:
排序它。警告的话:我也有 MySQL 坐在 /usr/local/ 中,我无意中弄乱了权限,所以如果你有其他重要的东西,要小心:-) 修复:
sudo chown -R mysql:wheel /usr/local/mysql/data
Hope this helps someone!
希望这对某人有帮助!