1

Since I tried to install a package that was trying to overwrite some files used by a service, I then stopped its installation.
Now, apt-get purge returns the following message:

The following packages have unmet dependencies:
 libc-dev-bin : Depends: libc6 (> 2.28) but 2.27-3 is to be installed
 libc6-dev : Depends: libc6 (= 2.28-5) but 2.27-3 is to be installed
 locales : Depends: libc-bin (> 2.28) but 2.27-3 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Since, I don't want to update those dependencies, is it possible to restore a previous version of the listed packages until they are okay with the current installed dependencies?

1 Answers1

1

The key clue is the error message "Version A is needed, but Version B is to be installed." On a stock Ubuntu system, versions A and B are the same, so there is no error. All packages in one release are built against the same versions of all dependencies.

This error only occurs when you introduce a new wrong-version apt-source for packages. The new source wants different versions than are in the Ubuntu repositories, hence the error.

The dependency error is only a symptom. It's really a source problem. You unwisely added a wrong-version source.

Let's do a tiny bit of detective work to confirm that it's a sources problem: The rmadison application (from the devscripts package) indicates that:

  • libc6 version 2.28 is Ubuntu 18.10/19.04
  • libc6 version 2.27-3 is Ubuntu 18.04.

In this case, the error message means that you are running Ubuntu 18.04, but you have added an 18.10 or 19.04 source. Don't do that. Wrong versions will break your system...as you have discovered.

user535733
  • 62,253