Maria-Christina Rus
Maria-Christina Rus

Reputation: 141

Can't find wand/MagickWand.h

I have update my system to Ubuntu 15.04 and now Rmagick can't be installed...

It gives me the following error:

$ gem install rmagick -v '2.13.2'
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

    /home/maria/.rvm/rubies/ruby-2.1.1/bin/ruby -r ./siteconf20150428-16155-3f5duq.rb 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.

I install all the packages needed (imagemagick libmagickwand-dev, etc, I have tried all the packages described in other questions)

Does someone had the same problem? Any clue?

Everything was working fine before updating to 15.04

EDIT I managed to make it work purging imagemagick and installing from source http://www.imagemagick.org/script/install-source.php?ImageMagick=9s6tlikqbn5eb0u0spg5o38sa4#unix

Now gives me this error: This installation of RMagick was configured with ImageMagick 6.9.1 but ImageMagick 6.8.9-9 is in use.

Upvotes: 12

Views: 8649

Answers (4)

Ali
Ali

Reputation: 7527

If you are on Debian/Ubuntu I was able to fix it by doing the following:

  1. sudo apt-get install libmagickwand-dev

  2. sudo apt-get install graphicsmagick-imagemagick-compat

  3. PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH" gem install rmagick -v '2.13.2'

your lib versions may be different so check the version in /usr/lib/x86...

I got this from this discussion: https://github.com/ttscoff/Slogger/issues/344

Upvotes: 2

Austio
Austio

Reputation: 6095

I am on ubuntu 15.04 and was able to get it by specifying version of rmagick

gem 'rmagick', '2.15.0'

Upvotes: 2

joeloui
joeloui

Reputation: 202

I had the same problem and I fixed it up updating rmagick. What I did was:

sudo apt-get install libmagickwand-dev imagemagick
bundle update rmagick

And now bundle works correctly.

Upvotes: 3

Aleksei Matiushkin
Aleksei Matiushkin

Reputation: 121010

I ran into same problem on clean Ubuntu 15.4 installation. Upgrade rmagick from 2.13.2 to 2.15.0 helped.

Things I tried, that did not help:

  • manually symlink in /usr/include/wand MagickWand.hmagick_wand.h;
  • rolling back to libmagickcore-dev.

Hope it helps.

Upvotes: 1

Related Questions