[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to get out of a "...but it is not going to be installed"-type situation with apt-get?



On 2015-12-19 at 10:24, Kynn Jones wrote:

> I apologize for all these apt-related questions.
> 
> I have rtfm'd on this ad nauseam.  For years, literally.
> 
> Still, I'm routinely rendered utterly helpless by this sort of thing:
> 
>     % sudo apt-get -qq update
>     % sudo apt-get -qq upgrade
>     % sudo apt-get -qq dist-upgrade
>     % sudo apt-get install ffmpeg
>     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:
>      ffmpeg : Depends: libavcodec-ffmpeg56 (>= 7:2.7) but it is not
> going to be installed or
>                        libavcodec-ffmpeg-extra56 (>= 7:2.7) but it is
> not going to be installed
>               Depends: libavdevice-ffmpeg56 (>= 7:2.6) but it is not
> going to be installed
>               Depends: libavfilter-ffmpeg5 (>= 7:2.4) but it is not
> going to be installed
>               Depends: libavformat-ffmpeg56 (>= 7:2.6) but it is not
> going to be installed
>     E: Unable to correct problems, you have held broken packages.
> 
> 
> Where does one begin troubleshooting out such problems?

Assuming you don't actually have any package holds (check 'apt-mark
showhold' to verify that), and since you've already confirmed that you
don't have any seemingly-applicable pins:

Append one or more of the listed packages to the 'apt-get install'
command line, and see what you get; repeat as necessary. (You may well
eventually end up having to specify all of them.)

In the end, you will probably wind up with an error stating that one
package's dependencies conflict with those of another; this most
commonly happens with versioned dependencies. From there, you can
specify install / remove actions for those two packages explicitly, in
order to break the dependency-resolution deadlock.

If you're lucky, you can often shortcut this by looking at the
dependency / conflict lists of the named packages directly, via
'apt-cache show' or similar.


Alternatively, if you know (or are willing to learn) how to use
aptitude's curses interface, it can do some of the work for you. Run
just 'aptitude' with no arguments, and refer to the program's internal
help documentation as needed; I'm only loosely familiar with it myself,
so I can't really guide you very well, but I've used it a few times to
track down and resolve such issues in the past.

There's a relatively steep learning curve to the aptitude curses
interface, or so it seems to me, but it does seem to be fairly powerful
once you've gotten your head far enough around it.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: