Hatena::ブログ(Diary)

わからん

2013.07.14

[][] Ubuntu13.04 で gem install rmagick -v '2.13.2' に失敗したときの対処例

rmagick -v '2.13.2' を Ubuntu にインストールしようとするとエラーになりました。imagemagick に加えて、libmagickwand-dev を事前にインストールしておくことでうまくゆきました。


以下は、インストール、調査のログです。

$ gem install rmagick -v '2.13.2'

  Fetching: rmagick-2.13.2.gem (100%)
  Building native extensions.  This could take a while...
  ERROR:  Error installing rmagick:
          ERROR: Failed to build gem native extension.
   
      /home/m/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb
  checking for Ruby version >= 1.8.5... yes
  checking for gcc... yes
  checking for Magick-config... no
  Can't install RMagick 2.13.2. Can't find Magick-config in /home/m/.rbenv/versions/2.0.0-p247/bin:/home/m/.rbenv/libexec:/home/m/.rbenv/plugins/ruby-build/bin:/home/m/d/bin/git-hook/bin:/usr/local/heroku/bin:/home/m/bin:/home/m/Dropbox/bin:/home/m/.rbenv/bin:/home/m/d/bin/git-hook/bin:/usr/local/heroku/bin:/home/m/bin:/home/m/Dropbox/bin:/home/m/.rbenv/shims:/home/m/.rbenv/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/m/bin:/home/m/perl5/bin:/home/m/bin/google_appengine:/home/m/bin:/home/m/perl5/bin:/home/m/bin/google_appengine
   
  *** 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=/home/m/.rbenv/versions/2.0.0-p247/bin/ruby
   
   
  Gem files will remain installed in /home/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2 for inspection. 
  Results logged to /home/m/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/ext/RMagick/gem_make.out

$ sudo apt-get install imagemagick libmagickwand-dev

  パッケージリストを読み込んでいます... 完了
  依存関係ツリーを作成しています                
  状態情報を読み取っています... 完了
  imagemagick はすでに最新バージョンです。
  imagemagick は手動でインストールしたと設定されました。
  以下の特別パッケージがインストールされます:
    gir1.2-rsvg-2.0 libdjvulibre-dev libexif-dev libgraphviz-dev libilmbase-dev libjasper-dev libjbig-dev
    liblcms2-dev liblqr-1-0-dev liblzma-dev libmagickcore-dev libopenexr-dev librsvg2-dev libtiff5-dev
    libtiffxx5 libwmf-dev libxdot4 libxt-dev
  提案パッケージ:
    liblzma-doc librsvg2-doc libwmf-doc libxt-doc
  以下のパッケージが新たにインストールされます:
    gir1.2-rsvg-2.0 libdjvulibre-dev libexif-dev libgraphviz-dev libilmbase-dev libjasper-dev libjbig-dev
    liblcms2-dev liblqr-1-0-dev liblzma-dev libmagickcore-dev libmagickwand-dev libopenexr-dev librsvg2-dev
    libtiff5-dev libtiffxx5 libwmf-dev libxdot4 libxt-dev
    ...
$ gem install rmagick -v '2.13.2'

  Building native extensions.  This could take a while...
  Successfully installed rmagick-2.13.2
  Parsing documentation for rmagick-2.13.2
  unable to convert "\xE8" from ASCII-8BIT to UTF-8 for ext/RMagick/RMagick2.so, skipping
  unable to convert "\x90" from ASCII-8BIT to UTF-8 for ext/RMagick/rmagick.o, skipping
  unable to convert "\xB8" from ASCII-8BIT to UTF-8 for ext/RMagick/rmdraw.o, skipping
  unable to convert "\x90" from ASCII-8BIT to UTF-8 for ext/RMagick/rmenum.o, skipping
  unable to convert "\xD0" from ASCII-8BIT to UTF-8 for ext/RMagick/rmfill.o, skipping
  unable to convert "\x89" from ASCII-8BIT to UTF-8 for ext/RMagick/rmilist.o, skipping
  unable to convert "\xD5" from ASCII-8BIT to UTF-8 for ext/RMagick/rmimage.o, skipping
  unable to convert "\x89" from ASCII-8BIT to UTF-8 for ext/RMagick/rminfo.o, skipping
  unable to convert "\x89" from ASCII-8BIT to UTF-8 for ext/RMagick/rmmain.o, skipping
  unable to convert "\x89" from ASCII-8BIT to UTF-8 for ext/RMagick/rmmontage.o, skipping
  unable to convert "\xE0" from ASCII-8BIT to UTF-8 for ext/RMagick/rmpixel.o, skipping
  unable to convert "\x80" from ASCII-8BIT to UTF-8 for ext/RMagick/rmstruct.o, skipping
  unable to convert "\x89" from ASCII-8BIT to UTF-8 for ext/RMagick/rmutil.o, skipping
  unable to convert "\xE8" from ASCII-8BIT to UTF-8 for lib/RMagick2.so, skipping
  Installing ri documentation for rmagick-2.13.2
  1 gem installed

はてなユーザーのみコメントできます。はてなへログインもしくは新規登録をおこなってください。

Google