Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImageMagick / RMagick - Can't install RMagick 2.13.1. Can't find Magick-config

I used a script to install ImageMagick http://github.com/masterkain/ImageMagick-sl

After a while, I got ImageMagick installed.

Then I ran sudo gem install rmagick and got

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

.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking 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...

I'm working in OSX Snow Leopard with Ruby 1.9.2 and Rails 3. Any ideas?

like image 450
teecraft Avatar asked Oct 08 '10 20:10

teecraft


3 Answers

I was getting the same error and it got resolved after installing the libmagick9-dev library on ubuntu 11.



Update (Thanks to the commenters - Dec. 2012)

$ sudo apt-get install libmagickwand-dev or $ sudo apt-get install graphicsmagick-libmagick-dev-compat for ubuntu 12

$ sudo apt-get install libmagickwand-dev or $ sudo apt-get install libmagick9-dev for ubuntu 11 or below.

$ yum install ImageMagick-devel for centos

$ brew install imagemagick for Mac OS (using Homebrew)

like image 138
eaykin Avatar answered Nov 16 '22 00:11

eaykin


you need the imagemagick libraries under ubuntu

$ sudo apt-get install libmagickwand-dev

it contains all missing libraires

then run bundle install command

like image 26
antiqe Avatar answered Nov 16 '22 00:11

antiqe


I believe you need the Imagemagick libraries.

If you are using Homebrew (which I'd highly recommend), simply do

$ brew install imagemagick

Then rerun bundle install

like image 25
Nic Aitch Avatar answered Nov 16 '22 01:11

Nic Aitch