4

機関車の宝石をレールアプリにインストールしようとしています。rmagick gem 2.12.2 を使用する依存関係があります。

rmagic 2.13.2 の最新バージョンを正常にインストールしましたが、gem が必要とする古いバージョンには、imagemagick witch のインストールに何らかのパスの問題があるようです。バージョン 6.8.0-10 です。

私は、brew と bla bla bla を使用して imagemagic を再インストールするさまざまな環境パスを設定するように言っている多くの投稿を読みました。主な問題はrmagicバージョンにあり、imagemagickの場所とバージョンに依存しています

gem のインストールで発生する現在のエラーは次のとおりです。

    ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

        /Users/mwallace/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:107: Use RbConfig instead of obsolete and deprecated Config.
checking for clang... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.3.5... yes
checking for HDRI disabled version of ImageMagick... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
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
Can't install RMagick 2.12.2. 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
    --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/mwallace/.rvm/rubies/ruby-1.9.3-p362/bin/ruby
    --with-MagickCorelib
    --without-MagickCorelib
    --with-Magicklib
    --without-Magicklib
4

1 に答える 1

1

私はちょうどこれに遭遇しました。問題は、rmagick 2.12.2 が ImageMagick 6.8 以降と互換性がないことです。rmagick 2.13.2 の変更ログから:

RMagick 2.13.2
    o Fixed issues preventing RMagick from working with version 6.8 or higher
    o Fixed issues preventing RMagick from working with ruby 1.9.3 

古いバージョンの rmagick が必要な場合は、ImageMagick をダウングレードする必要があります。私の場合、簡単な画像のサイズ変更とフォーマット変換を行うコードは 4 行しかないので、rmagick から image_magick に切り替えました。また、ImageMagick ライブラリを使用しているため、同じ機能を備えていますが、ライブラリの純粋な Ruby ラッパーであるため、ImageMagick 6.4 から 6.8 までの間、およびおそらくそれよりも広い範囲のバージョンで動作するようです。API は rmagick に非常に似ていますが、同一ではありません。

于 2013-06-21T11:23:06.637 に答える