1

I am trying to do bundle install

but when trying it gives me error as

Can't install RMagick 0.0.0. Can't find Magick-config

Tried goggling for solution but none of the solution worked for me.

I also tried installing gem rmagick before doing bundle install but it also give me error where as I checked the installed location is has the file named MagickWand.h

Can't install RMagick 2.15.4. Can't find MagickWand.h.

Please help me on this

Sonalkumar sute
  • 2,565
  • 2
  • 17
  • 27

3 Answers3

2

you need the imagemagick library on your ubuntu machine.

This package includes all the static libraries needed to compile programs using MagickWand. It contains the MagickWand.h file

Just Run this from your terminal.

$ sudo apt-get install libmagickwand-dev

it will install all the missing libraires. then run bundle install again, it will work .

Subhash Chandra
  • 3,165
  • 1
  • 27
  • 30
  • thanks for such a quick reply, this I already tried. But it didn't worked. 'http://stackoverflow.com/questions/3704919/installing-rmagick-on-ubuntu?rq=1' In this answer by mike helped me – Sonalkumar sute May 26 '16 at 05:55
  • it worked for me on ubuntu 15.10, Try this on ubuntu 15.04 sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev – Subhash Chandra May 26 '16 at 05:58
0

You need to install imagemagic

sudo -i

cd

apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y

wget http://www.imagemagick.org/download/ImageMagick-6.8.9-1.tar.gz
tar xzvf ImageMagick-6.8.9-1.tar.gz

cd ImageMagick-6.8.9-1/

./configure --prefix=/opt/imagemagick-6.8 && make

checkinstall

for more details see This

Anurag Kumar
  • 555
  • 1
  • 4
  • 9
0

I was facing the same problem. I tried every solution on stackoverflow from making symlinks to installing libraries.

In the end, only install the required version of ImageMagick worked for me.

You can find instructions for it from here and source files from here

Edit:

  1. Download the source code of required version of ImageMagick from here
  2. cd /path/to/downloaded/file
  3. tar xvzf ImageMagick.tar.gz
  4. cd ImageMagick-x.x.x
  5. ./configure
  6. make
  7. sudo make install

You may need to configure the dynamic linker run-time bindings by sudo ldconfig /usr/local/lib

or adding this to .bashrc file export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"

Waris Ali
  • 1
  • 1
  • It might just help to elaborate the details from the instructions provided in the links, here (directly) as those details might change / be updated over time. – Sourabh Choraria Oct 07 '19 at 06:42