Debian – Can’t install php5-imagick on Debian

debianimagemagick

I am trying to install Image Magick.

$ sudo apt-get install php5-imagick
The following packages have unmet dependencies.
  php5-imagick: Depends: libfontconfig1 (>= 2.8.0) but 2.6.0-3 is to be installed
                Depends: libjpeg62 (>= 6b1) but 6b-14 is to be installed
                Depends: libltdl7 (>= 2.2.6b) but it is not installable
                Depends: libmagickcore3 (>= 8:6.6.0.4) but it is not installable
                Depends: libmagickwand3 (>= 8:6.6.0.4) but it is not installable

But then when I try to install the missing packages I get this:

$ sudo apt-get install libfontconfig1 libjpeg62 libltdl7 libmagickcore3 libmagickwand3 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libfontconfig1 is already the newest version.
libfontconfig1 set to manually installed.
libjpeg62 is already the newest version.
libjpeg62 set to manually installed.
Package libltdl7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libltdl7 has no installation candidate

How do I resolve these problems?

Best Answer

I used aptitude instead of apt-get, which provided options to resolve the problems instead of just failing.

Keep the following packages at their current version:
php5-common [5.3.8-1~dotdeb.1 (oldstable, now)]
php5-imagick [Not Installed]

^Not a helpful first "solution", mind. However the second one worked:

Install the following packages:
php5-imagick [5.3.8-1~dotdeb.1 (oldstable)]

Keep the following packages at their current version:
php5-common [5.3.8-1~dotdeb.1 (oldstable, now)]

Score is -9910

Accept this solution? [Y/n/q/?] Y