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?


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


For those who stuck with this question with i386 arch here is link to latest package for i386:

$ wget https://launchpad.net/~ondrej/+archive/php5/+files/php5-imagick_3.1.0%7Erc2-1%7Eprecise%2B1_i386.deb
$ dpkg -i php5-imagick_3.1.0~rc2-1~precise+1_i386.deb

Address will be changed again, so just go to https://launchpad.net and search "ondrej php5-imagick 64 presize"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.