如何使用自制程序安装 imagemagick?

发布于 2024-11-29 14:13:29 字数 1430 浏览 0 评论 0原文

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

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

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

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

是伱的 2024-12-06 14:13:29

您可以尝试:

brew update &&酿造安装imagemagick

You could try:

brew update && brew install imagemagick

平定天下 2024-12-06 14:13:29

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

cd /usr/local
git reset --hard FETCH_HEAD

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

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

The quickest fix for me was doing the following:

cd /usr/local
git reset --hard FETCH_HEAD

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

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

傾城如夢未必闌珊 2024-12-06 14:13:29
brew install imagemagick

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

brew install ghostscript
brew install imagemagick

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

brew install ghostscript
只等公子 2024-12-06 14:13:29

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

来自这个答案

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

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

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

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.

From this SO answer:

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.

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.

往昔成烟 2024-12-06 14:13:29

遇到类似的错误,并通过在 brew install imagemagick 之前运行 brew update 修复

Got a similar error and fixed by running brew update before brew install imagemagick

江挽川 2024-12-06 14:13:29

你可以这样做:

brew reinstall php55-imagick

其中 php55 是你的 PHP 版本。

You could do:

brew reinstall php55-imagick

Where php55 is your PHP version.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文