Posted about 11 years ago. Visible to the public.
Installing RMagick on Ubuntu
When installing RMagick Archive you may get an error messages like this:
Version 2.13.1:
Copychecking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick-config... no Can't install RMagick 2.13.1. Can't find Magick-config in /home/arne/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin *** 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.
Version 2.16.0:
CopyBuilding native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /home/user/.rbenv/versions/1.8.7-p375/bin/ruby extconf.rb checking for /usr/bin/gcc... yes checking for Magick-config... yes checking for outdated ImageMagick version (<= 6.4.9)... no checking for presence of MagickWand API (ImageMagick version >= 6.9.0)... no extconf.rb:84: command not found: MagickWand-config --cflags extconf.rb:84: command not found: MagickWand-config --cppflags extconf.rb:84: command not found: MagickWand-config --ldflags extconf.rb:84: command not found: MagickWand-config --libs checking for Ruby version >= 1.8.5... yes checking for stdint.h... yes checking for sys/types.h... yes checking for wand/MagickWand.h... no Can't install RMagick 2.16.0. 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.
Solutions
Make sure you have the necessary development packages installed.
Copysudo apt-get install libmagickcore-dev libmagickwand-dev
You might not require libmagickwand-dev
for some older versions of RMagick. On previous Ubuntus you may need to
install libmagick9-dev
Archive
instead.
Ubuntu 10.10
After installing the development packages this command should work:
Copygem install rmagick -v '2.13.1'
or upgrade rmagick
.
Ubuntu 18.04
Copyls -la /usr/lib/x86_64-linux-gnu/ImageMagick-6.9.7/bin-q16/ PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.9.7/bin-q16/:$PATH" gem install rmagick -v '2.13.1'
or upgrade rmagick
.
Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for unsupported versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2).