To install Imagick, you would normally do this via PECL.
sudo pecl install imagick
However, when trying this on Ubuntu 12.04 LTS, you may get an error similar to the following.
checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program
You can resolve this by installing a few extra packages.
sudo apt-get install libmagickwand-dev libmagickcore-dev
Now try re-running the original command and it should be successful.