如何使用自制软件安装imagemagick?

Kle*_* S. 191 git homebrew gcc gcc4 osx-lion

我正在尝试在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
Run Code Online (Sandbox Code Playgroud)

布鲁医生说:

-> 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.
Run Code Online (Sandbox Code Playgroud)

是的,我安装并运行了XCode 4.1.

-> brew update
From http://github.com/mxcl/homebrew
* branch            master     -> FETCH_HEAD
Already up-to-date.
Run Code Online (Sandbox Code Playgroud)

小智 158

你可以尝试:

brew update && brew install imagemagick

  • 请注意,"brew upgrade"升级了自制软件中的所有内容. (9认同)
  • 这对我来说非常适合mac os 10.11.1 El Capitan (5认同)

Mar*_*c L 87

对我来说最快的解决方法是执行以下操作:

cd /usr/local
git reset --hard FETCH_HEAD
Run Code Online (Sandbox Code Playgroud)

然后我重新尝试brew install imagemagick并正确地从新镜子中取出包装,而不是adamv.

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

  • 在Mac上@chovy,可执行文件称为“ magick”,并将在/ usr / local / bin / magick中符号链接到/usr/local/Cellar/imagemagick/7.0.8-8/bin/magick (3认同)
  • 可执行文件在哪里? (2认同)

Abd*_*UMI 62

brew install imagemagick
Run Code Online (Sandbox Code Playgroud)

gs如果要将pdf转换为图像,请不要忘记安装也是依赖项,例如:

brew install ghostscript
Run Code Online (Sandbox Code Playgroud)


Tom*_*ger 5

在这里回答旧线程(有点偏离主题),因为这是我在搜索如何在 Mac OS 上安装 Image Magick 以在本地网络服务器上运行时发现的内容。brew install Imagemagick 是不够的。您还必须安装 PECL,以便加载 PHP 模块。

这个 SO 答案

brew install php
brew install imagemagick
brew install pkg-config
pecl install imagick
Run Code Online (Sandbox Code Playgroud)

你可能需要sudo apachectl restart。然后phpinfo()在您的 Web 服务器上运行的简单 php 脚本中检查您的内容。

如果它仍然不存在,您可能在同一台 Mac 上运行多个版本的 PHP 时遇到问题(一个通过命令行,一个通过您的 Web 服务器)。解决该问题超出了本答案的范围,但有一些不错的选择。