如何使用自制程序安装 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 说:
-> 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可以尝试:
brew update &&酿造安装imagemagick
You could try:
brew update && brew install imagemagick
对我来说最快的修复方法是执行以下操作:
然后我重试
brew install imagemagick
并且它正确地从新镜像中提取了软件包,而不是 adamv。如果这不起作用,请确保
/Library/Caches/Homebrew
不包含任何 imagemagick 文件或文件夹。如果确实如此,请将其删除。The quickest fix for me was doing the following:
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.如果您想将 pdf 转换为图像,请不要忘记还安装
gs
这是一个依赖项:Don't forget to install also
gs
which is a dependency if you want to convert pdf to images for example :在这里回答旧线程(有点偏离主题),因为这是我在搜索如何在 Mac OS 上安装 Image Magick 以在本地网络服务器上运行时发现的。仅仅通过brew install Imagemagick是不够的。您还必须安装 PECL,以便加载 PHP 模块。
来自这个答案:
您可能需要
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:
And you may need to
sudo apachectl restart
. Then check yourphpinfo()
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.
遇到类似的错误,并通过在
brew install imagemagick
之前运行brew update
修复Got a similar error and fixed by running
brew update
beforebrew install imagemagick
你可以这样做:
其中 php55 是你的 PHP 版本。
You could do:
Where php55 is your PHP version.