RVM + Ruby 1.9.2 + Rmagick + Lion =系统正常,RVM不起作用 [英] RVM + Ruby 1.9.2 + Rmagick + Lion = System Works, RVM Doesn't

查看:98
本文介绍了RVM + Ruby 1.9.2 + Rmagick + Lion =系统正常,RVM不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在新安装的OS X Lion上通过RVM安装了Ruby 1.9.2.我已经通过自制软件安装了ghostscript和imagemagick,并且在使用RVM运行gem安装rmagick时失败.在ruby的系统安装上使用gem install rmagick时,它工作正常.

I've installed Ruby 1.9.2 through RVM on a fresh install of OS X Lion. I have installed ghostscript and imagemagick through homebrew, and when running gem install rmagick using RVM, it fails. When using gem install rmagick on the system install of ruby, it works just fine.

这是产生的错误:

    ─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的任何想法?

What could be causing this? Any ideas on how to get RVM to see the imagemagick like it's should?

推荐答案

magick安装程序脚本( https://github.com /maddox/magick-installer )在Mac上安装ImageMagick的工作非常出色.当我不使用此脚本进行安装时,安装似乎可以成功,但是gem找不到安装.

The magick-installer script ( https://github.com/maddox/magick-installer ) does a fantastic job of installing ImageMagick on the mac. When I installed without using this script, the install would appear to succeed but the gem would never find the installation.

使用此脚本,我成功安装了多次失败的安装程序.祝你好运:)

Using this script, I succeeded with installation where I had failed many times previously. Good luck :)

这篇关于RVM + Ruby 1.9.2 + Rmagick + Lion =系统正常,RVM不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆