RMagick 2.11.0 install fails with ImageMagick 6.5.4

Trying to install RMagick 2.11.0 was giving me the following error:

Updating rmagick
Building native extensions. This could take a while…
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb update
checking for Ruby version >= 1.8.5… yes
checking for cc… yes
checking for Magick-config… yes
checking for ImageMagick version >= 6.3.5… 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… yes
checking for InitializeMagick() in -lMagickCore… no
checking for InitializeMagick() in -lMagick… no
Can’t install RMagick 2.11.0. Can’t find the ImageMagick library or
one of the dependent libraries. Check the mkmf.log file for more
detailed information.

*** 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
–with-MagickCorelib
–without-MagickCorelib
–with-Magicklib
–without-Magicklib

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

convert -version was:

Version: ImageMagick 6.5.4-2 2009-07-04 Q8 OpenMP

Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

mkmf.log: http://pastebin.com/m776a3e36

Installing ImageMagick 6.5.5 fixes all this though. Was there a typo
in the required ImageMagick version for the build script?

pharrington wrote:

checking for Magick-config… yes

    --with-opt-lib

Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

mkmf.log: http://pastebin.com/m776a3e36

Installing ImageMagick 6.5.5 fixes all this though. Was there a typo
in the required ImageMagick version for the build script?

RMagick 2 works with ImageMagick 6.3.0 and later.

Line 98 in mkmf.log says “/usr/bin/ld: cannot find -lltdl”. That is, ld
failed because ImageMagick says it needs libltdl.so but that library
couldn’t be found. Googling “imagemagick libltdl” uncovers a number of
questions about this library and ImageMagick. I’m guessing that some
change to ImageMagick 6.5.5 configuration resolved the problem.