12

The most used close target for apt/dpkg questions is this. However, that does not help if the problem is not with apt but with the underlying dpkg.

I very often find things like these when I check the and tags and that really bugs me. How can an APT question solve a DPKG problem? Unfortunately, people who misunderstand the underlying issue are misinforming users about how to solve their problems and mistakenly flagging those questions as duplicates. This, in turn, makes people ask more questions, because their problem hasn't been solved. This has to stop.

I've written extensive guides about what information a question should have to provide the relevant answer/duplicate for most of the common problems of apt and dpkg. Here and elsewhere. Yet the situation in Ask Ubuntu doesn't improve.

For now, I decided to re-title the infamous "How do I resolve unmet dependencies?" question to "How do I resolve unmet dependencies after adding a PPA?" following what the answers and users believe will help to solve OP's problem (btw, the whole question is a massive Catch-22, since you can't install the desired package because dependency issues which can be solved by removing the PPA, but can't remove the PPA because the package you want to install is provided by that PPA).

So, please, whenever you see:

The following packages have unmet dependencies:
apache2: 
    Depends: apache2.2-common (= 2.2.22-1ubuntu1) but 2.2.22-1ubuntu1.2 is to be installed    
E: Unable to correct problems, you have held broken packages.

Ask for the output of apt-cache policy all-the-package-listed and sudo apt-get check. If you see:

E: Sub-process /usr/bin/dpkg returned an error code (1)

Ask for the the same as above, the complete output of whatever OP is trying to do and sudo dpkg -C.

This way we will make sure that OP solve his problem along with achieving whatever he's trying to do. If that information isn't provided, flag it as "Unclear what you are asking". That way, you do the site a favor, and we provide precise solution to precise problems.

15
  • Do you have a link to said informative question?
    – Seth Mod
    Commented Oct 17, 2014 at 16:42
  • @Seth they are in the tag wiki, I think.
    – Braiam
    Commented Oct 17, 2014 at 16:44
  • I am woefully under experienced in dependency issues (I've only ever had 3 and they were all none issues), but wouldn't it be possible to create a Q/A that describes how to debut these problems and possibly fix some simple ones? Just thinking out loud.. There are probably too many possibilities for that to be reasonable.
    – Seth Mod
    Commented Oct 17, 2014 at 17:06
  • @Seth I will presume that you haven't read this answer, tl;dr: isn't possible to write in a single question all the possible solutions. There's this through
    – Braiam
    Commented Oct 17, 2014 at 17:21
  • Yes, I realize there are too many scenarios to provide a fix for them all, but I thought a basic debugging question might give them enough understanding to fix some of the more basic ones themselves. Similar to Wild Man's wireless issues question.
    – Seth Mod
    Commented Oct 17, 2014 at 17:57
  • @Seth that's a bit of a issue itself, there's the basic which I pointed in my question, and even so in some cases it falls short, for example, when you use third party restricted (non open source) software which you don't have public information about dependencies, in such cases is necessary apt-cache depends package, for example.
    – Braiam
    Commented Oct 17, 2014 at 23:43
  • Basically all I was suggesting was that you write up a "How do I troubleshoot dependency issues" post so that people who take the time to ask proper questions have proper resources and so we have better methods to deal with questions like this one.
    – Seth Mod
    Commented Oct 21, 2014 at 19:19
  • @Seth umm?
    – Braiam
    Commented Oct 22, 2014 at 0:53
  • I can't close questions as a duplicate of that ;)
    – Seth Mod
    Commented Oct 22, 2014 at 1:03
  • @Seth err... isn't that question more of a guidance about "what information we need to help you" not "this will solve your problem", so, you don't need a duplicated for that. Like this one
    – Braiam
    Commented Oct 22, 2014 at 1:13
  • It's kind of a grey line (I see your point, I'm not entirely convinced myself)... Either way though, we should get our own local copy, even if you just copy+paste it (with attribution ofc).
    – Seth Mod
    Commented Oct 22, 2014 at 1:20
  • @Seth if you want to push it, you can use this to explain the issue. Not as duplicated target, since it doesn't solve anything.
    – Braiam
    Commented Oct 23, 2014 at 16:09
  • sudo apt-get -f install is what APT says and yet people ask this.
    – retrixe
    Commented Oct 25, 2014 at 19:14
  • 1
    @IAnsari if that was the magic that fixed all problems, people wouldn't be asking questions, you know? That fix it if people did normal things, but people keeps doing abnormal things which leads to these situations. Also, the message says "Try using -f" not "-f will fix it".
    – Braiam
    Commented Oct 25, 2014 at 19:36
  • @Braiam Maybe you're right.
    – retrixe
    Commented Oct 25, 2014 at 19:42

0

You must log in to answer this question.

Browse other questions tagged .