本文介绍了在Mac OS X上安装Rmagick时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为 OSX安装 RMagick

我已经从 John Maddux 完成了 Imagemagick 安装(要安装的解决方案) OSX上的 ImageMagick ,不使用 MacPorts

I have done the Imagemagick installation from John Maddux (solution to install ImageMagick on OSX without using MacPorts)

这是我的终端窗口:

Suebphatt:~ suebphattleelertphong$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

Suebphatt:~ suebphattleelertphong$ rails -v
Rails 3.0.3

Suebphatt:~ suebphattleelertphong$ gem -v
1.3.7

Suebphatt:~ suebphattleelertphong$ gem install rmagick
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1 for     inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
Suebphatt:~ suebphattleelertphong$

非常感谢您的帮助,
Suebphatt

Thanks a lot for help,Suebphatt

推荐答案

我强烈建议你试试自制软件,这是macports的绝佳替代品:

I would strongly recommend you try homebrew, which is a great replacement for macports:




  • http://brew.sh
  • http://github.com/mxcl/homebrew

一旦你得到安装好自制软件,你应该可以非常轻松地安装imagemagick和rmagick:

Once you get homebrew installed, you should be able to install imagemagick and rmagick very easily:

brew install imagemagick     # will take a while!
gem install rmagick

此处更多信息:

此处:

更新:(感谢和)

尝试安装l如果您在安装chiliproject时遇到问题,请不要使用openpmp:

Try to install without openpmp if you are having trouble with a chiliproject install:

brew install imagemagick --disable-openmp

UPDATE X2 :(感谢的评论

UPDATE X2: (thanks to Ramon Araujo's comment)

如果您以前使用自制软件安装了imagemagick,则必须在再次安装之前取消链接:

If you have previously installed imagemagick with homebrew, you will have to unlink it before you install again:

brew unlink imagemagick

这篇关于在Mac OS X上安装Rmagick时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 20:31