Installing Imagick PHP Extension on CentOS 6.3 64bit?

8,263

Solution 1

You can use pkg-config to locate header file MagickWand.h Suppose you install ImageMagick in /usr/local/ImageMagick-6.8.4 and imagick-3.0.1

cd imagick-3.0.1
export PKG_CONFIG_PATH=/usr/local/ImageMagick-6.8.4/lib/pkgconfig
phpize
./configure --with-php-config=/usr/local/php5/bin/php-config \
--with-imagick=/usr/local/ImageMagick-6.8.4/
make
make install

Solution 2

I'd suggest you drop your custom compiled PHP and switch over the to the version provided by IUS. Specifically, you'd install the following packages after configuring the IUS repo:

php53u php53u-pecl-imagick

This will probably make things significantly easier for you, as you won't have to worry about compiling this module anymore.

Share:
8,263

Related videos on Youtube

Synxmax
Author by

Synxmax

Someone in love with c++ , java , php and man i love dealing with problems

Updated on September 18, 2022

Comments

  • Synxmax
    Synxmax over 1 year

    I am trying to configure and make install imagick extension, here is commands that i used

    wget http://pecl.php.net/get/imagick-3.0.1.tgz
    tar zxf imagick-3.0.1.tgz
    cd imagick-3.0.1
    phpize
    ./configure
    

    But this error happen :

    checking for MagickWand.h header file... configure: error: Cannot locate header file MagickWand.h
    

    I found MagickWand.h at this location

    /local/include/ImageMagick-6/wand
    

    Here is my ImageMagic Version

    Version: ImageMagick 6.8.3-7 2013-03-06 Q16 http://www.imagemagick.org
    Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
    Features: DPC OpenMP Modules
    Delegates: bzlib djvu fontconfig freetype gslib jng jp2 jpeg lcms openexr pango png ps rsvg tiff wmf x xml zlib
    

    Is there any option with configure so i can locate that header file ?

    am i installing right version since my php is 5.3 and ImageMagick 6.8.3-7 trying to install imagick-3.0.1 !?

    Thanks in advance

    • Admin
      Admin about 11 years
      Hi I also struggle in a half-day that i tried all of things above. But it doesn't work Finally, I decided to reading the configure file. Therefore, some miss-configurations about Magickwand.h. You should search" wand", for example, and modify the path to point to your specific Magickwand.h To file down where is your MaigickWand, jus run above shell-script snippet... In my case, in the path, which point to MagickWand.h is missed "6" in Imagick word
  • Synxmax
    Synxmax about 11 years
    I did this ./configure --with-imagick=/local/include/ImageMagick-6 --with-php-config=/usr/bin/php-config but still getting same error !?
  • emcconville
    emcconville about 11 years
    Configure should resolve the include path by use of /local/bin/MagickWand-config. So ./configure --with-imagick=/local will be enough
  • Synxmax
    Synxmax about 11 years
    Still Same checking ImageMagick MagickWand API configuration program... found in /usr/local/bin/MagickWand-config checking if ImageMagick version is at least 6.2.4... found version 6.8.3 Q16 checking for MagickWand.h header file... configure: error: Cannot locate header file MagickWand.h
  • devicenull
    devicenull about 11 years
    That gives you the PHP 5.2 version of the module.