0

Apparently while I was not seeing, the apt/dpkg tag became a mess. There are a bunch of posts that are duplicated one of the other, a long list of concatenated duplicates of duplicates, duplicates that leads to nowhere, and the overuse of a post that won't help anybody.

Now, I'm building a list of the most common problems about dpkg/apt:

1. are you root?

The error itself is very clear. OP isn't root and hence it can't use dpkg/apt-get. The canonical question is:

Unable to lock the administration directory (/var/lib/dpkg/), are you root?

2. is another process using it?

Again another clear message, there's another apt/dpkg instance running? The way to identify which process is detailed here and ways to fix it here.

3. The following packages have unmet dependencies: E: Unable to correct problems, you have held broken packages.

This one is very tricky! As detailed by Vangel Ajanovski answer there are 1 and thousand ways to fix the problem depending of the circumstances and the action that triggered the problem. As he said, There is NO single right answer for this question and there is NO simple answer. Hence if you are thinking to flag it as duplicated of How do I resolve unmet dependencies after adding a PPA?, think again, is not.

Now, what's the problem with this? Normally people uses several PPA which maintainers seems that doesn't understand the beautifulness of the Debian Package System causing serious dependencies issues when people tries to install their packages. Depending the final goal (install a package, remove it, upgrade) and the packages involved (rhythmbox, wine, amarok, mono, etc.) there solution is suit tailored, unless the PPA is popular.

So please, do not abuse this question. If you see sudo apt-get install package or sudo apt-get (dist-)upgrade as the trigger of the problem, ask OP to include the output of sudo apt-get check, cat /etc/apt/sources.list{,.d/*.list} and apt-cache policy packages-involved to their questions. You can also ask me or AvinashRaj (he's getting a knot of dpkg/apt) in chat or ask the UL guys.

There are other common problems with dpkg/apt (overriding a file provided by another package, for example) that sometimes will need a fix from the package maintainer or another advanced method.

4. The use of --force

This is backwards, if you see an answer that use --force without explaining why or using it as first solution (ie. there are another answers trying to fix the issue but OP failed) be free of downvote them. You shouldn't abuse of the force or the dark side will swallow you... err... since it's possible that your system will have issues later when you try to upgrade/remove the package.

0

1 Answer 1

1

This one seems unsolveable.

The reason everything gets duped to "How do I resolve unmet dependencies" is people mixing PPAs and other repositories in a ton of untestable combinations. There's no way we can have a Q+A for each combination, considering that a bunch of them are changing all the time.

Most of the "I have installed Foo PPA and now my computer is broken" is either a bug, or too localized.

5
  • Yeah, I know. But as the question is worded everyone is duping anything that has The following packages have unmet dependencies to that question (the title is misleading too) and that approach is not optimal for people that isn't using PPA's at all. I had sent another two mails to some PPA maintainers since most PPA's doesn't have bug trackers.
    – Braiam
    Commented Feb 28, 2014 at 19:06
  • Take for example this one askubuntu.com/q/167688/169736
    – Braiam
    Commented Feb 28, 2014 at 19:13
  • Maybe a question along the lines of "How do I troubleshoot unmet dependencies" would be better?
    – Seth Mod
    Commented Feb 28, 2014 at 19:23
  • @Seth you mean something like this? Not to fix, but to know what the problem is?
    – Braiam
    Commented Feb 28, 2014 at 20:16
  • @Braiam yes, more like that.
    – Seth Mod
    Commented Feb 28, 2014 at 20:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .