Cannot get RMagick to install

I have been trying for quite some time to get RMagick to install on my
Ubuntu 10.4 machine. For the life of me, I can’t get it to install,
current version or older versions. I’ve looked around online and tried
everything I’ve seen with no luck.

Via Synaptic Package Manager, I have installed:

librmagick-ruby
librmagick-ruby-doc
librmagick-ruby1.8

and every other graphicsmagick/imagemagick package I can find.

I also have libmagickwand2 since my error seems to be referring to the
mysterious MagickWand.h file.

Can’t install RMagick 2.13.1. Can’t find MagickWand.h.
*** extconf.rb failed ***

This is very frustrating because I need to support a website by doing
Rails development on my local machine. The host also runs on Ubuntu,
perhaps version 7.x.x, so much older. The host has rmagick 1.15.15 and
it continues to work fine. Unfortunately, I cannot even start my local
webserver because of the rmagick dependency. It seems a waste of energy
to remove all the dependencies to rmagick since I ultimately need it.
Frankly, I’m almost to the point of not using rmagick-dependent gems.

I am worried that all my tries and failures have left me with a mucked
up system. Any help would be greatly valued. If you’ve been a
programmer for any length of time, I know you can relate to this type of
thing. Anyway, thanks for reading this.

Mario

From my console:

sudo gem install rmagick

Building native extensions. This could take a while…
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for Ruby version >= 1.8.5… yes
checking for gcc… yes
checking for Magick-config… yes

Warning: Found more than one ImageMagick installation. This could cause
problems at runtime.
/usr/local/bin/Magick-config reports version 6.5.5 Q16 is
installed in /usr/local
/usr/bin/Magick-config reports version 1.3.5 is installed in
/usr
Using 6.5.5 Q16 from /usr/local.

Warning: Found a partial ImageMagick installation. Your operating system
likely has some built-in ImageMagick libraries but not all of
ImageMagick. This will most likely cause problems at both compile and
runtime.
Found partial installation at: /usr
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.1. 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.

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=/usr/bin/ruby1.8

Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to
/usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

Hi,

On 03.09.2010 02:30, Mario T. Lanza wrote:

Via Synaptic Package Manager, I have installed:

librmagick-ruby
librmagick-ruby-doc
librmagick-ruby1.8

and every other graphicsmagick/imagemagick package I can find.

The *.h files usually reside within the respective development packages,
e.g. libmagick-dev or something along; try that.

You can use apt-file to find out which file is in which package; should
work on Ubuntu as well.

$ apt-file search MagickWand.h
imagemagick-doc:
/usr/share/doc/imagemagick/www/api/MagickWand/struct__MagickWand.html
libmagickwand-dev: /usr/include/ImageMagick/wand/MagickWand.h

HTH

On Fri, Sep 3, 2010 at 11:35 PM, Mario T. Lanza [email protected]
wrote:

Thanks Markus. I will definitely give that a try.

I am pretty close to simply formatting the harddrive and starting fresh.
I installed the latest Ubuntu iso to a virtual machine and had no
problem installing RMagick.

By way of anecdotal evidence, I had a lot of problems upgrading ubuntu
between intrepid and jaunty, and finally had to simply reinstall
(after which everything worked fine)

martin

Thanks Markus. I will definitely give that a try.

I am pretty close to simply formatting the harddrive and starting fresh.
I installed the latest Ubuntu iso to a virtual machine and had no
problem installing RMagick.

I was actually able to install it on my current installation, but there
are two versions of ImageMagick and RMagick cannot determine which one
to use. It keeps grabbing the older version rather than the newer
version under which it was compiled.

I really appreciate that you took the time to answer.

By way of anecdotal evidence, I had a lot of problems upgrading ubuntu
between intrepid and jaunty, and finally had to simply reinstall
(after which everything worked fine)

martin

That is the path I ultimately took and it worked fine. It took about 3
hours of effort to do this. At this point, I’ve even formed a backup
strategy that allows me to do this sort of system rebuild as I run into
this sort of thing in the future.

While it may seem like one should figure out how to fix issues like this
rather than simply formatting the harddrive and starting over; there’s a
lot more peace in having confidence things will work following a
reformatting vs. being not-quite-sure if this outdated thread or that
outdated thread will send you down the right path and get things fixed.

By minimizing my system customizations and relying only on essential
software, I think I can keep the starting-from-scratch approach down to
about 120-150 minutes.

All the best, Martin.

Just to add my two cents:

I am using Ubuntu 10.04. I followed following steps to get “rmagick” to
install properly.

  1. Used Synaptic and removed following packages by selecting… “Mark
    for complete removal”
  • graphicsmagick
  • imagemagick
  • associated development libraries (searched for imagemagick-deve)
  1. Re-installed libmagick+±dev which installed all other dependencies.
  2. Tried installing “rmagick” and this time got success.

Please let me know, if this worked for you.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs