4

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?

2 Answers2

4

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.

L. D. James
  • 25,036
  • Ran into this issue as well. I had selected to download from "fastest mirror" in the "Software & Updates" section. I WAS able to fix it by "apt-get update" and "apt-get upgrade" but ONLY AFTER switching back to "Server for United States" – Andrew P Oct 19 '17 at 17:47
-1

I met the same problem.

system: Linux mint 18.1 "Serena"

When I did like this:

$ sudo apt-get install vlc browser-plugin-vlc

Outcomes:

sudo: unable to resolve host mint
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:
vlc : Depends: vlc-nox (= 2.2.2+git20170601+r59025+56~ubuntu16.04.1) but it is not going to be installed
Depends: libavcodec-ffmpeg56 (>= 7:2.4) but it is not going to be installed or
libavcodec-ffmpeg-extra56 (>= 7:2.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I tried many methods that i can search on the net, such like:

$ sudo apt-get update 
$ sudo apt-get upgrade

$ sudo apt-get update --fix-missing

$ sudo apt-get autoclean $$ apt-get clear cache

and so on.

But those can help me to solve the problem.

I also see Synaptic Package Manager --> Custom Filters --> Broken, there were no broken package.

Finally, I changed the software source, then I tried

 $ sudo apt-get install vlc browser-plugin-vlc

The problem was solved.