9

Pulling my hair out. PHP built from source, everything working. Now need to install imagick and can't get it installed.

I am running Debian on kernel 3.7.1 with PHP 5.3.20 (the last version my app supports, cannot go to PHP 5.4).

pecl install imagick
...
checking ImageMagick MagickWand API configuration program... found in /usr/bin/Wand-config
checking if ImageMagick version is at least 6.2.4... configure: error: no. You need at least Imagemagick version 6.2.4 to use Imagick.
ERROR: `/tmp/pear/temp/imagick/configure --with-imagick' failed

Yet, I have version 6.7.7 installed:

# convert --version
Version: ImageMagick 6.7.7-10 2012-11-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

I also tried installing the latest beta (pecl install imagick-beta), same result. Also tried an old version 2.3.0, same result. Also tried downloading source, phpize, and configure -- same result.

Can someone help please?

ctrlbrk
  • 1,174
  • 2
  • 17
  • 27

1 Answers1

18

I was finally able to solve this myself. I ended up doing:

apt-get remove graphicsmagick-libmagick-dev-compat imagemagick imagemagick-common
apt-get autoremove

Then:

apt-get install libmagickwand-dev

And finally was able to get imagick installed via pecl:

pecl install imagick-beta
ctrlbrk
  • 1,174
  • 2
  • 17
  • 27
  • 2
    Thank you for answering your own question! Helped me out! – Marien Mar 13 '13 at 13:00
  • I had the same struggle, installing the stable version from PECL produced issues during make install and did not complete - in result the installation was not complete and I couldnt use it. I read that it has to do with PHP5.4 compatibility (I use 5.4.4) so I tried pecl install imagick-3.1.0RC2 and it worked! :) It's good to update ghostscript by that occasion as well to ensure proper cooperation with IM. – Gadoma Aug 28 '13 at 15:25
  • I was able to install `pecl install imagick` (not beta) on wheezy after just doing `apt-get install libmagickwand-dev`. Thanks for the tip! – spoulson Dec 06 '13 at 12:49
  • I didn't need to remove those packages but the key was indeed installing imagick-beta rather than the current. even Two years later. Thanks! – yuvilio May 01 '15 at 01:48
  • ¡and don't forget to add `extension=imagick.so` to your `php.ini`! – vladkras Jul 23 '17 at 07:46
  • I didn't need to remove or uninstall anything. I using ran the `sudo apt-get install libmagickwand-dev`. This was on Ubuntu 16.04 LTS. – L. D. James Oct 30 '17 at 02:03