0

I believe I may have some dependencies installed in the wrong version for my system, because I keep getting errors whenever I try to use apt-get. For instance:

sudo apt-get install minicom

results in these errors:

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libc-dev-bin : Depends: libc6 (< 2.12) but 2.13-38+deb7u8 is to be installed
 libc6 : Depends: libc-bin (= 2.13-38+deb7u8) but 2.11.2-10 is to be installed
         Breaks: locales (< 2.13)
 libc6-dev : Depends: libc-dev-bin (= 2.13-38+deb7u8) but 2.11.2-10 is to be installed
             Breaks: gcc-4.4 (< 4.4.6-4) but 4.4.5-8 is to be installed
 locales : Depends: glibc-2.11-1
 ntp : Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

So I try to fix it with sudo apt-get -f install. But I get almost identical errors:

The following packages have unmet dependencies:
 libc-dev-bin : Depends: libc6 (< 2.12) but 2.13-38+deb7u8 is installed
 libc6 : Depends: libc-bin (= 2.13-38+deb7u8) but 2.11.2-10 is installed
         Breaks: locales (< 2.13)
 libc6-dev : Depends: libc-dev-bin (= 2.13-38+deb7u8) but 2.11.2-10 is installed
             Breaks: gcc-4.4 (< 4.4.6-4) but 4.4.5-8 is installed
 locales : Depends: glibc-2.11-1
 ntp : Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

Except this time, I get the two extra errors down at the bottom. I'm really at a loss here for how to solve this problem.

Here is what I've tried so far:

Firstly, links to related questions:

Unable to install most major packages; Unmet dependencies and cannot be fixed

Trouble downloading packages list due to a "Hash sum mismatch" error

Fix dependency when apt-get -f install fails

E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages

How do I resolve unmet dependencies after adding a PPA?

apt-get stopped working because of dependancy issue - libegl1-mesa

None of these questions or their answers helped me although I tried them all. The final link in that list seemed to most promising considering it has almost identical error messages, but it didn't solve my issue either.

Here's a quick summary of what I've tried:

  • Removing files with `sudo apt-get remove [package]. This results in the exact same output as when I try to install anything.
  • Looking at the /var/log/apt/term.log file for broken things to remove. This didn't really help because again, I can't remove anything.
  • sudo apt-get clean then sudo apt-get update - clean returns nothing, and the update hits all my sources without problem. But it doesn't fix anything.
  • sudo apt-get dist-upgrade - returns similar issues to installing
  • apt-get install --reinstall [package] on things that look broken - returns similar issues to installing
  • dpkg --remove [package] - I've done this to a couple packages and it works, but as I'm not quite sure where the problem lies, this could just break things more.
  • What are the contents of /etc/apt/sources.list (and any file in /etc/apt/sources.list.d)? – fkraiem Feb 4 '16 at 17:13
  • What version of Ubuntu are you running? See if you can install aptitude (sudo apt-get install aptitude) and use that instead of apt-get. It's more aggressive in fixing issues than apt-get, which means it can just resolve the problem and install minicom, but it can also remove some important packages. Be careful when you use it. – TheWanderer Feb 4 '16 at 20:36
  • +deb7u8 looks like Debian, not Ubuntu. – fkraiem Nov 27 '17 at 9:28
1

I've had similar problems and I figured that in most cases the only thing you have to do is

sudo dpkg --configure -a

and then

sudo apt-get install -f

If that doesn't help, you should edit file /var/lib/dpkg/status and delete whole blocks of broken packages. Then repeat the first two commands and that's it.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.