如何安装imagemagick与自制软件?

我试图在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. 

对我来说最快的解决办法是做到以下几点:

 cd /usr/local git reset --hard FETCH_HEAD 

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

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

你也可以试试

brew update && brew install imagemagick

 brew install imagemagick 

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

 brew install ghostscript 

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

你可以这样做:

 brew reinstall php55-imagick 

哪里php55是你的PHP版本。