Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have ImageMagick (version 6.6.9-7) on Ubuntu 12.04, which has libmagickcore4. When I tried to install PHP imagick, I received the following error:

The following packages have unmet dependencies:
 php5-imagick : Depends: libmagickcore3 (>= 8: but it is not installable
                Depends: libmagickwand3 (>= 8: but it is not installable
E: Unable to correct problems, you have held broken packages.

Apparently, the problem is that php5-imagick is based on libmagickcore3 but a newer verion has been installed on my Ubuntu.

Is there a way to instruct PHP imagick to use libmagickcore4?

share|improve this question
Compile it from source using phpize then manually enable it in php. This should do the trick. –  Logic Wreck Sep 5 '12 at 14:56
@LogicWreck yeah that would be a trick, but I prefer to use apt-get, as everything came this way on my machine! –  All Sep 5 '12 at 15:01

2 Answers 2

sudo apt-get update and try again.

share|improve this answer
I tried this before, but no effect. It seems I need to find a new repository for PHP5-imagick, though I think it is the latest version, as I installed my PHP (5.3.16) from dotdeb repository. –  All Sep 5 '12 at 15:19

I recommend to use PECL until the package gets updated.

You will need these packages to use pecl

sudo apt-get install php-pear php5-dev libcurl3-openssl-dev

Install imagick

sudo pecl install imagick


sudo sh -c "echo 'extension=imagick.so' > /etc/php5/conf.d/imagick.ini"

This is essentially doing the same thing as php5-imagick

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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