Saturday, 2 March 2013

Installing rmagick

Error

   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /home/gowthaman/.rvm/rubies/ruby-1.9.2-p320/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/gowthaman/.rvm/gems/ruby-1.9.2-p320/bin:/home/gowthaman/.rvm/gems/ruby-1.9.2-p320@global/bin:/home/gowthaman/.rvm/rubies/ruby-1.9.2-p320/bin:/home/gowthaman/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/share/ruby-rvm/bin

*** 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=/home/gowthaman/.rvm/rubies/ruby-1.9.2-p320/bin/ruby


Gem files will remain installed in /home/gowthaman/.rvm/gems/ruby-1.9.2-p320/gems/rmagick-2.13.2 for inspection.
Results logged to /home/gowthaman/.rvm/gems/ruby-1.9.2-p320/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.2), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.


Solution:

         sudo apt-get install libmagickcore-dev libmagickwand-dev

10 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi is this solution for windows..coz i think its not..can you please help me with the same error for windows...thanks in adv..:)

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. solution for windows: don't develop with ruby on rails on windows :)

    ReplyDelete
  5. you're the best man ;-) How long it took you to get that?

    ReplyDelete
  6. You have saved me so much time! Wow! Thanks you.

    ReplyDelete
  7. But its not working , i got
    libmagickcore-dev : Depends: libmagickcore5 (= 8:6.7.7.10-5ubuntu2) but 8:6.7.7.10-5ubuntu2.1 is to be installed

    ReplyDelete