我试图在OSX Lion上安装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/ruby-1.9.2-p180@global/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.

当前回答

你可以试试:

Brew更新&& Brew安装imagemagick

其他回答

你可以这样做:

brew reinstall php55-imagick

php55是你的PHP版本。

得到一个类似的错误,并通过运行brew更新在brew安装imagemagick修复

对我来说,最快的解决方法是:

cd /usr/local
git reset --hard FETCH_HEAD

然后我重新尝试brew install imagemagick,它正确地从新的镜像中取出包,而不是adamv。

如果这不起作用,请确保/Library/Caches/Homebrew不包含任何imagemagick文件或文件夹。如果是,就删除它们。

你可以试试:

Brew更新&& Brew安装imagemagick

brew install imagemagick

不要忘记安装gs,这是一个依赖,如果你想将pdf转换为图像,例如:

brew install ghostscript