Installing ImageMagick on Ubuntu with PECL is really simple. But I want to share how to install it, and also to remind myself someday if I forget. ImageMagick is a PHP library for image processing. But it’s not developed just for PHP — they now have libraries for Ruby, Perl, Python, etc. You can visit their official website here.
Let’s continue with how to install ImageMagick/Imagick on Ubuntu:
1. Open your terminal.
2. Install php-pear if you haven’t already with this command:
sudo apt-get install php-pear php5-dev
3. Install ImageMagick with this command:
sudo apt-get install imagemagick libmagickwand-dev
4. Install imagick with PECL, with this command:
sudo pecl install imagick
5. Open your php.ini and add this line: extension=imagick.so
That’s it, now you can use the ImageMagick library in PHP. Have a nice day…
