You are hereHome / Development / How to install imagick and gmagick on Ubuntu
How to install imagick and gmagick on Ubuntu
I had to struggle a while installing the PECL extensions imagick and gmagick on my Ubuntu Hardy machine, here's a simple how-to.
imagick
Ubuntu Hardy comes with a package for imagick. You can install it by calling sudo apt-get install php5-imagick. However, this installs vesion 2.0.0, which is way too old, and misses some important (though still undocumented) features. If you want to upgrade to a more recent version (3.0.0 or higher), you must install it manually using the PECL installer.
sudo apt-get install imagemagick libmagick9-devsudo pecl install imagick- Confirm all questions by hitting return
- Create file
/etc/php/conf.d/imagick.iniand add a line "extension=imagick.so" - Reload Apache:
sudo /etc/init.d/apache2 reload
gmagick
The gmagick extension is not bundled with Ubuntu, so it must be installed manually anyway.
sudo apt-get install graphicsmagick libgraphicsmagick1-devsudo pecl install gmagick- Confirm all questions by hitting return
- Create file
/etc/php/conf.d/gmagick.iniand add a line "extension=gmagick.so" - Reload Apache:
sudo /etc/init.d/apache2 reload
I noticed that having both extensions enabled causes phpinfo to suddenly break. So this may be a problem.
