2011-08-13 85 views
142

我正在试图在OSX Lion上安装Imagemagick,但有些东西并不像预期的那样工作。如何安装imagemagick与自制软件?

-> brew install imagemagick 

/usr/local/git/bin/git 
==> Cloning https://github.com/adamv/ImageMagick.git 
Cloning into /Users/klebershimabuku/Library/Caches/Homebrew/imagemagick--git... 
fatal: https://github.com/adamv/ImageMagick.git/info/refs not found: did you run git  update-server-info on the server? 
Error: Failure while executing: git clone --depth 1 https://github.com/adamv/ImageMagick.git /Users/kleber/Library/Caches/Homebrew/imagemagick--git 

酿造医生说:

-> brew doctor 
We couldn't detect gcc 4.0.x. Some formulae require this compiler. 

Some "config" scripts were found in your path, but not in system or Homebrew folders. 

`./configure` scripts often look for *-config scripts to determine if software packagesare installed, and what additional flags to use when compiling and linking. 

Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. 

/Users/kleber/.rvm/gems/[email protected]/bin 
passenger-config 

Setting DYLD_LIBARY_PATH can break dynamic linking. 
You should probably unset it. 

是的,我的XCode 4.1安装和运行。

-> brew update 
From http://github.com/mxcl/homebrew 
* branch   master  -> FETCH_HEAD 
Already up-to-date. 
+5

你需要'更新';我们现在对ImageMagick使用了不同的镜像,而adamv则不在了。 –

+1

我已经酿造过更新了。它已经是最新的了。 –

+2

您可能需要手动更新,我们最近一直遇到问题:https://github.com/mxcl/homebrew/issues?labels=update-install-issue&sort=updated&direction=desc&state=open&page=1 –

回答

71

最快的修复,我在做以下操作:

cd /usr/local 
git reset --hard FETCH_HEAD 

然后我试brew install imagemagick并正确从新镜拉,而不是adamv包。

如果这不起作用,请确保/Library/Caches/Homebrew不包含任何imagemagick文件或文件夹。如果有,请将其删除。

+1

今天不再工作了。如果你现在遇到了这个问题,那是因为你试图安装一个依赖于现在不存在的repo的旧版本。 – MattiSG

+0

可执行文件在哪里? – chovy

+1

从今天起,这仍然适用于我。 – cevaris

3

升级到Lion后重新安装xcode吗?如果您事先安装了它,那么安装将不再有效。我有同样的问题,但不是与imagemagick。

-9

你可以这样做:

brew reinstall php55-imagick 

哪里php55是你的PHP版本。

+3

不是问题的答案,但它对我有帮助。我只想知道PHP ImageMagick公式的名称和搜索引擎在这里引导我。 – Glutexo

95

你可以尝试:

brew update && brew install imagemagick

+5

这在mac os 10.11上完美的工作。1 El Capitan – otmezger

+6

请注意,“酿造升级”可以升级自制软件中的所有东西。 – Apie

31
brew install imagemagick 

不要忘了还装gs这是一种依赖,如果你想将PDF转换为图像,例如:

brew install ghostscript