【问题标题】:RVM + Ruby 1.9.2 + Rmagick + Lion = System Works, RVM Doesn'tRVM + Ruby 1.9.2 + Rmagick + Lion = 系统有效,RVM 无效
【发布时间】:2011-11-04 10:36:30
【问题描述】:

我已经通过 RVM 在全新安装的 OS X Lion 上安装了 Ruby 1.9.2。我已经通过自制软件安装了 ghostscript 和 imagemagick,当使用 RVM 运行 gem install rmagick 时,它失败了。在 ruby​​ 的系统安装上使用 gem install rmagick 时,它工作得很好。

这是产生的错误:

    ─wedtm@WedHQ  ~/.rvm/gems/ruby-1.9.2-p290/cache ‹ruby-1.8.7› 
╰─$ gem install rmagick                                                                                                                                                                                                                                                   1 ↵
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

        /Users/wedtm/.rvm/rubies/ruby-1.8.7-p352/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for clang... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... yes
checking for InitializeMagick() in -lMagickCore... no
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagick++... no
Can't install RMagick 2.13.1. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/wedtm/.rvm/rubies/ruby-1.8.7-p352/bin/ruby
    --with-MagickCorelib
    --without-MagickCorelib
    --with-Magicklib
    --without-Magicklib
    --with-Magick++lib
    --without-Magick++lib


Gem files will remain installed in /Users/wedtm/.rvm/gems/ruby-1.8.7-p352/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/wedtm/.rvm/gems/ruby-1.8.7-p352/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

这可能是什么原因造成的?关于如何让 RVM 以应有的方式查看 imagemagick 的任何想法?

【问题讨论】:

    标签: ruby rvm osx-lion rmagick homebrew


    【解决方案1】:

    magick-installer 脚本 (https://github.com/maddox/magick-installer) 在 Mac 上安装 ImageMagick 方面做得非常出色。当我在不使用此脚本的情况下安装时,安装似乎成功,但 gem 永远找不到安装。

    使用这个脚本,我成功地安装了我之前多次失败的地方。祝你好运:)

    【讨论】:

    • 这是否为您解决了问题?
    • 不知道为什么,但这成功了。至少直到下次我遇到 Rails 和 ImageMagick 的一些问题...
    • 哇,太棒了!这极大地帮助了我。我曾尝试使用 Brew 安装 ImageMagick,但始终无法安装 Rmagick。这成功了。一个问题:ImageMagick使用这种方法安装后如何卸载?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-14
    • 2011-01-09
    • 1970-01-01
    • 2011-03-31
    • 1970-01-01
    • 2012-03-22
    相关资源
    最近更新 更多