51
54

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gem install rmagickでchecking for Magick-config... noがでる解決方法

Last updated at Posted at 2015-03-15

rmagickのインストールをしようとしたところエラーがでました。Railsプロジェクトの開発で環境はVagrant上のCentOSです。

rmagickのインストールでエラーが発生

rmagickをインストールしようしましたが、エラーがでて失敗します。

rmagickのインストールでエラー
gem install rmagick

Fetching: rmagick-2.13.4.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
	ERROR: Failed to build gem native extension.

    /home/vagrant/.rbenv/versions/2.2.0/bin/ruby -r ./siteconf20150313-7941-u2y4vg.rb extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for ImageMagick version >= 6.4.9... *** 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.
以下略

どうやらchecking for Magick-config... noという部分があやしいですね。ImageMagickがそもそも無いのかと。

ImageMagickとImageMagick-develのインストール

ImageMagickをインストールします。

ImageMagickをインストール
sudo yum -y install ImageMagick

この後にrmagickをインストールしようとすると失敗しました。

再びrmagickのインストールでエラー
gem install rmagick

Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
	ERROR: Failed to build gem native extension.

    /home/vagrant/.rbenv/versions/2.2.0/bin/ruby -r ./siteconf20150313-8135-6yh4ql.rb extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for ImageMagick version >= 6.4.9... yes
以下略

まだ何か足りないみたいです。
ImageMagick-develもインストールします。

ImageMagick-develをインストール
sudo yum -y install ImageMagick-devel

ImageMagick-develがインストールされます。

rmagickのインストールが成功

rmagickを再度インストールします。

rmagickのインストール
gem install rmagick

Building native extensions.  This could take a while...
Please report any bugs. See https://github.com/gemhome/rmagick/compare/RMagick_2-13-2...master and https://github.com/rmagick/rmagick/issues/18
Successfully installed rmagick-2.13.4
Parsing documentation for rmagick-2.13.4
Installing ri documentation for rmagick-2.13.4
Done installing documentation for rmagick after 7 seconds
1 gem installed

今度はrmagickのインストールが成功しました。

参考

51
54
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
51
54

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?