Installing php5-imagick in Ubuntu 12.04 w/ ondrej packages results in dependency error

aptpackagesphp5ubuntu-12.04

I've been trying to setup an Ubuntu 12.04 VM that is running PHP 5.4 with the imagick module. All the results I find on google say to use the ondrej packages, which for the most part works perfectly. All the major modules install and run exactly the way they should, but when I try to install imagick it tells me I'm missing a dependency.

# apt-get install php5-imagick
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php5-imagick : Depends: phpapi-20090626
E: Unable to correct problems, you have held broken packages.

phpapi-20090626 appears to be something that should have been installed along with php5.

Is this an error in the package? What can I do to resolve this?

Best Answer

I finally resolved this last night by downloading the package manually from the ondrej repo and installing it with dpkg:

$ wget https://launchpad.net/~ondrej/+archive/php5/+files/php5-imagick_3.1.0%7Erc1-1%7Eprecise%2B1_amd64.deb
$ dpkg -i php5-imagick_3.1.0~rc1-1~precise+1_amd64.deb

Update: package not found 404,this is correct address: https://launchpad.net/~ondrej/+archive/ubuntu/php5-oldstable/+files/php5-imagick_3.1.0%7Erc2-1%7Eprecise%2B1_amd64.deb