Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 233
Maria-Christina Rus Avatar asked Apr 28 '15 08:04

Maria-Christina Rus


3 Answers

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.

like image 141
joeloui Avatar answered Nov 07 '22 06:11

joeloui


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

gem 'rmagick', '2.15.0'
like image 2
Austio Avatar answered Nov 07 '22 05:11

Austio


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.

like image 1
Aleksei Matiushkin Avatar answered Nov 07 '22 05:11

Aleksei Matiushkin