Ubuntu:Unable to correct problems, you have held broken packages

I am trying to install ImageMagick Library.
with the command:

sudo apt-get install libmagickwand-dev

But It give error like:

libmagickwand-dev : Depends: libmagickwand5 (= 8:6.7.7.10-6ubuntu3.4) but it is not going to be installed
Depends: libmagickcore5-extra (= 8:6.7.7.10-6ubuntu3.4) but it is not going to be installed
Depends: libmagickcore-dev (= 8:6.7.7.10-6ubuntu3.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

What is the solution of this type of problem?


First ensure your system's libraries are update by running:

$ sudo apt update
$ sudo apt upgrade

Then manually install the Depends that are displayed in the error message.

Then install the package as normal.