e x p r e s s i c a

ruby on rails, business and technicalities

No public Twitter messages.

  • RSS
  • Facebook
  • Twitter
  • Linkedin

While installing RMagick on Linux, if you are getting errors like this
“GraphicsMagick-config… no configure: error: Can’t install RMagick. Can’t find Magick-config or GraphicsMagick-config program. …”,
below is the solution for this error.

RMagick requires ImageMagick and which further requires loads of dependencies already available to get installed and work properly. I was figuring out of those all, and thank god got a quite simple and elegant way to do all that in just three commands.
First you will have to install imagemagick then libmagick9-dev and then finally you can install rmagick.

Here are the commands…

[source:ruby]
sudo apt-get install imagemagick
sudo apt-get install libmagick9-dev
sudo gem install rmagick
[/source]

24 Responses so far.

  1. [...] Trying to get RMagick Gem installed can be a pain the butt on any system including Ubuntu Feisty. Thankfully Sur figured out how to do it 3 easy steps. [...]

  2. Brian says:

    This rocks – thanks for saving me from 2 days of apt-get hell.

  3. sms says:

    Only works on Ubuntu .. Tried on PCLinuxOS and it’s bad .. really bad.
    The Development Libraries conflict with the regular ones ..

    I wish you had used gd2 instead of RMagic stuff .. not really worth the trouble .. 4+ hours and no end in sight

  4. sur says:

    So, can’t you read the title that its for Ubuntu… If suits you then use it… otherwise stop cribbing, find a way out for whatsoever OS you are upto and post it on your blog to help others.

  5. sms says:

    I did read, you seem to have the blinders .. take it for what it’s worth.
    Yes, here you say that this is howto for Ubuntu .. but I followed this link from your simple-captcha .. it wasn’t mentioned anywhere that it will only work out of the box on Ubuntu .. I did arrive at this point after 2+ hours of your 10 minutes solution.

    So some cribbing is warranted.

    The problem is for KDE based systems, a lot them packages rely on ImageMagick with the “non-dev” version of the lib installed.
    There is NO easy solution to it .. if you try to install the -dev version of the lib, then it removes all the packages using the regular lib and then you have 10 times more work at hand. (this with synaptic of course .. you can do a hand job and possibly get away .. but you never know what that will break.)

  6. sms says:

    And BTW you don’t have to do cli based installed, both of these ImageMagick and the lib are available as Ubuntu packages from Synaptic it self .

  7. Akhil Bansal says:

    Hey Thanks SUR,

    I upgraded my ubuntu from 7.04 to 7.10, and was trying to install RMagicK. It was throwing the error you said above, even all the required libs are installed. I followed the steps you specified and all done.

    You saved much time

    Thanks again

  8. sur says:

    Hey Akhil,

    glad to know that it helped you :)

  9. [...] Provides Ruby 1.8.6 (patchlevel 111). Good! The libmagick is also available but still the RMagick needs to be installed the way I posted here. [...]

  10. todd says:

    Haven’t introduced a security flaw into your system when you follow these instructions? http://www.ruby-lang.org/en/news/2008/06/20/arbitrary-code-execution-vulnerabilities/ Ubuntu using a vulnerable version of ruby but perhaps ubuntu security cancels this out. I don’t know.

  11. rek says:

    thank you very much

  12. Josh says:

    Can’t thank you enough for this, saved me from a huge headache. Kudos!

  13. joost says:

    These instructions still work perfectly on Ubuntu 9.04! Thanks!

  14. Jordan says:

    Good article! Thank you very much! Save me much time!

  15. igeek says:

    Thx bud. Helped me clear the final hurdle!

    (also was last straw 2remind me that imagick just isn’t worth the effort. Porting everything I have of of it.

  16. tikh says:

    Thank you! Very simple and usefull.

  17. stephen says:

    that did it…what a headache

  18. Ask says:

    Awesome! You saved me much time!

  19. GenĂ­s says:

    I tried this in ubuntu 8.04, but due to versions update, now rmagick gem need more updated libs than ubuntu is installing. Do you know any workaround to solve this?

  20. Javier says:

    Thank you so much from Mexico


Sponsors