Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto: Install Imagick (for php) on Ubuntu 11.10

Tags:

php

pecl

imagick

I'm attempting to install ImagicK as its required for a Yii Extension I want to use for my project.

I've checked around and followed a few different suggestions but nothing that has worked so far, ultimately the framework extension is still throwing me an error (Must have ImagicK installed).

I've tried things like:

sudo apt-get update sudo apt-get install imagick-php5 .. etc 

as well as the PECL install which ends up throwing me the following error:

Checking ImageMagick MagickWand API configuration program... configure: error:  not found. Please provide a path to MagickWand-config or Wand-config program.  

Any help as to how to get ImagicK installed and integrated with PHP on Ubuntu 11.10 would be great.

Thanks in advance!

like image 803
DJSunny Avatar asked Oct 24 '11 02:10

DJSunny


People also ask

How do I add imagick to PHP?

Navigate to Home - Software - Module Installers, then click on the Manage button next to PHP Pecl. In the next screen, select the required PHP version, then click Apply. You can now enter “imagick” in the Install a PHP Pecl field, and click the Install Now button.

How do I install imagick library?

To install it, download Visual C++ Redistributable Package. Congratulations, you have a working ImageMagick distribution under Windows and you are ready to use ImageMagick to convert, compose, or edit your images or perhaps you'll want to use one of the Application Program Interfaces for C, C++, Perl, and others.


2 Answers

Installation steps for Ubuntu 12.04:

  1. Install imagemagick

    sudo apt-get install imagemagick

  2. Install imagemagick PECL extension

    sudo apt-get install php5-imagick

  3. Restart webserver

like image 36
Sumoanand Avatar answered Sep 25 '22 09:09

Sumoanand


The package has a different name in Ubuntu.

 sudo apt-get install php5-imagick 

The error with building via PECL means you must install libmagickwand-dev, libmagickcore3, libmagickwand3 probably (there are alternatives: graphicsmagick-imagemagick-compat, see Synaptic).

like image 105
mario Avatar answered Sep 21 '22 09:09

mario