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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7053996/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 11:33:26  来源:igfitidea点击:

How do I install imagemagick with homebrew?

gitgcchomebrewosx-liongcc4

提问by Kleber S.

I'm trying to install Imagemagick on OSX Lion but something is not working as expected.

我正在尝试在 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 says:

酿造医生说:

-> 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.

And yes, I have XCode 4.1 installed and running.

是的,我已经安装并运行了 XCode 4.1。

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

采纳答案by Marc L

The quickest fix for me was doing the following:

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

cd /usr/local
git reset --hard FETCH_HEAD

Then I retried brew install imagemagickand it correctly pulled the package from the new mirror, instead of adamv.

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

If that does not work, ensure that /Library/Caches/Homebrewdoes not contain any imagemagick files or folders. Delete them if it does.

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

回答by davarisg

You could try:

你可以试试:

brew update && brew install imagemagick

brew update && brew install imagemagick

回答by Abdennour TOUMI

brew install imagemagick

Don't forget to install also gswhich is a dependency if you want to convert pdf to images for example :

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

brew install ghostscript

回答by Tom Auger

Answering old thread here (and a bit off-topic) because it's what I found when I was searching how to install Image Magick on Mac OS to run on the local webserver. It's not enough to brew install Imagemagick. You have to also PECL install it so the PHP module is loaded.

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

From this SO answer:

这个 SO 答案

brew install php
brew install imagemagick
brew install pkg-config
pecl install imagick

And you may need to sudo apachectl restart. Then check your phpinfo()within a simple php script running on your web server.

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

If it's still not there, you probably have an issue with running multiple versions of PHP on the same Mac (one through the command line, one through your web server). It's beyond the scope of this answer to resolve that issue, but there are some good options out there.

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

回答by Oscar Salguero

You could do:

你可以这样做:

brew reinstall php55-imagick

Where php55 is your PHP version.

其中 php55 是您的 PHP 版本。