s_a
s_a

Reputation: 65

Error while Installing RMagick gem

I have first installed ImageMagick using this command -

sudo apt-get install imagemagick

But when I do bundle install I get this error -

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /home/aasish/.rvm/gems/ruby-2.3.0@re-management/gems/rmagick-2.15.4/ext/RMagick
/home/aasish/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160826-4124-lxm3rv.rb extconf.rb
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  
/home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/aasish/.rvm/gems/ruby-2.3.0@re-management/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/mkmf.log

extconf failed, exit code 1

I need help with this even I tried changing the version of ImageMacick from 6.7.7 to 7.0.2

I using an Ubuntu 14.04 OS

this is the error -

You have to install development tools first.
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:587:in `try_cpp'
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:1091:in `block in have_header'
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
    from /home/aasish/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:1090:in `have_header'
    from extconf.rb:38:in `configure_headers'
    from extconf.rb:18:in `initialize'
    from extconf.rb:517:in `new'
    from extconf.rb:517:in `<main>'

Upvotes: 1

Views: 611

Answers (1)

Deepak Mahakale
Deepak Mahakale

Reputation: 23661

You have to install development tools first.

Try installing dev-tools

sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev

Upvotes: 1

Related Questions