Dec 312013
 

아래와 같은 에러를 내면서 “gem install rmagick”이 실패할 경우, 아래의 “checking for wand/MagickWand.h”를 주의깊게 보자. magickwand 라이브러리가 설치되어 있지 않기 때문에 발생하는 것이다.

root@wminserver:/home/redmine/redmine/redmine-2.4# gem install rmagick
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
	ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... 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... no

Can't install RMagick 2.13.2. Can't find MagickWand.h.
*** 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=/usr/local/rvm/rubies/ruby-2.1.0/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.0/gems/rmagick-2.13.2 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/rmagick-2.13.2/gem_make.out

 

해결방법

libmagickwand-dev를 설치해 줌으로써 해결이 된다. 아래의 명령을 실행시켜보도록 하자.

$ sudo apt-get install libmagickwand-dev
$ gem install rmagick

문제없이 잘 설치 될 것이다.

Reference

[1] Stack Overflow(Can’t install RMagick 2.13.1. Can’t find MagickWand.h), http://stackoverflow.com/questions/9050419/cant-install-rmagick-2-13-1-cant-find-magickwand-h


  2 Responses to “ubuntu에서 gem install rmagick 실행시 실패할 경우 해결방법”

  1. […] 스택오버플로우 글 하나를 첫번째로 띄어주었다[1]. 글을 읽어보니 이전 포스팅에서 확인한 것과 같이 라이브러리를 설치해야한다는 것이였다. 별 […]

  2. 천재세요? 덕분에 한 방에 해결 했습니다!

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.