rmagick gem install “Can’t find Magick-config”

When building native Ruby gems, sometimes you’ll get an error containing “ruby extconf.rb”. This is often caused by missing development libraries for the gem you’re installing, or even Ruby itself.

Do you have apt installed on your machine? If not, I’d recommend installing it, because it’s a quick and easy way to get a lot of development libraries.

If you see people suggest installing “libmagick9-dev”, that’s an apt package that you’d install with:

$ sudo apt-get install libmagickwand-dev imagemagick

or on centOs:

$ yum install ImageMagick-devel

On Mac OS, you can use Homebrew:

$ brew install imagemagick

Leave a Comment