0

sudo apt upgrade showing following error

    You might want to run 'apt --fix-broken install' to correct these.
    The following packages have unmet dependencies:
     libc-bin : Depends: libc6 (< 2.36) but 2.37-12 is installed
     libc6-dev : Depends: libc6 (= 2.35-0ubuntu3.6) but 2.37-12 is installed
                 Depends: libc-dev-bin (= 2.35-0ubuntu3.6)
     locales : Depends: libc-bin (> 2.37)
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

apt --fix-broken install showing following error and the same error was shown in synaptic package manager when i tried to fix broken install

    The following packages have unmet dependencies:
     libc-bin : Depends: libc6 (< 2.36) but 2.37-12 is installed
     libc6-dev : Depends: libc6 (= 2.35-0ubuntu3.6) but 2.37-12 is installed
                 Depends: libc-dev-bin (= 2.35-0ubuntu3.6)
     locales : Depends: libc-bin (> 2.37)
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
    E: Unable to correct dependencies

sudo dpkg --configure -a command shows following error:

    dpkg: dependency problems prevent processing triggers for libc-bin:
     libc-bin depends on libc6 (<< 2.36); however:
      Version of libc6:amd64 on system is 2.37-12.
dpkg: error processing package libc-bin (--configure):
 dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
 libc-bin

sudo apt-get install -f shows following error

    Correcting dependencies... failed.
    The following packages have unmet dependencies:
     libc-bin : Depends: libc6 (< 2.36) but 2.37-12 is installed
     libc6-dev : Depends: libc6 (= 2.35-0ubuntu3.6) but 2.37-12 is installed
                 Depends: libc-dev-bin (= 2.35-0ubuntu3.6)
     locales : Depends: libc-bin (> 2.37)
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
    E: Unable to correct dependencies

sudo apt install libc6="2.35-0ubuntu3.6" displayed following error:

You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libc-dev-bin : Depends: libc6 (> 2.37) but 2.35-0ubuntu3.6 is to be installed libc6-dbg : Depends: libc6 (= 2.37-12) but 2.35-0ubuntu3.6 is to be installed libc6-dev : Depends: libc-dev-bin (= 2.35-0ubuntu3.6) locales : Depends: libc-bin (> 2.37) E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I have tried many things from the internet but everything shows one of these 2 or 3 errors. Please help me fix it. Please, please help! Thanks

apt policy libc6 shows following output

    libc6:
      Installed: 2.37-12
      Candidate: 2.37-12
      Version table:
     *** 2.37-12 100
            100 /var/lib/dpkg/status
         2.35-0ubuntu3.6 500
            500 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
            500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
         2.35-0ubuntu3 500
            500 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Is there any chance this could be fixed.I actually tried to install katoolin in my ubuntu 22.04 machine but everything went smooth till system upgrade and when it started upgrading,it showed the errors mentioned above. Please help me fix it?

OUTPUT OF sudo dpkg -l | grep '^.[^i]'

    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                                       Version                                 Architecture Description
    +++-==========================================-=======================================-============-================================================================================
    rc  linux-image-6.2.0-26-generic               6.2.0-26.26~22.04.1                     amd64        Signed kernel image generic
    rc  linux-image-6.2.0-39-generic               6.2.0-39.40~22.04.1                     amd64        Signed kernel image generic
    rc  linux-modules-6.2.0-26-generic             6.2.0-26.26~22.04.1                     amd64        Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
    rc  linux-modules-6.2.0-39-generic             6.2.0-39.40~22.04.1                     amd64        Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
    rc  linux-modules-extra-6.2.0-26-generic       6.2.0-26.26~22.04.1                     amd64        Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
    rc  linux-modules-extra-6.2.0-39-generic       6.2.0-39.40~22.04.1                     amd64        Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
    rc  node-esprima                               4.0.1+ds+~4.0.3-2                       all          ECMAScript parsing infrastructure for multipurpose analysis
    rc  node-mime                                  3.0.0+dfsg+~cs3.96.1-1                  all          library for mime-type mapping for Node.js
    rc  node-source-map                            0.7.0++dfsg2+really.0.6.1-9             all          Mozilla source map generator and consumer - Node.js module
    rc  node-sprintf-js                            1.1.2+ds1+~1.1.2-1                      all          Node.js Pure JavaScript sprintf implementation
    rc  npm                                        8.5.1~ds-1                              all          package manager for Node.js

OUTPUT OF uname -a

    Linux ciph3r-Inspiron-3537 6.5.0-15-generic #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 12 18:54:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
noisefloor
  • 1,086
  • Picking a package in your paste shows a 22.04 system should get libc6 | 2.35-0ubuntu3.6 | jammy-updates | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x which is not the 2.37-12 you have installed, thus you're either not using Ubuntu 22.04 LTS, or have corrupted your install with packages intended for something else. What are you using? What do you get if you apt policy libc6 as your provided details do not match a 22.04 system. – guiverc Feb 03 '24 at 07:18
  • @guiverc EVERY OUTPUT IS LISTED ABOVE. – THORN HILL Feb 03 '24 at 08:08
  • 2
    "2.37-12" doesn't have "ubuntu" in the version so it's unofficial software. You either installed an untrusted .deb from the internet or added a bad third-party PPA. This is not supported. Your best option is to reinstall and stop installing unofficial software – Daniel T Feb 03 '24 at 08:54
  • reiinstall what? OS or smething else – THORN HILL Feb 03 '24 at 09:29
  • 2
    I meant backing up your files and reinstalling the OS. It is possible to fix this without a reinstall but it would involve a lot of work. If you want to bother with this, you can start by following rusty's comment – Daniel T Feb 03 '24 at 09:48
  • sudo apt -f reinstall locales=2.35-0ubuntu3.6 I think there is started to go messed. locales : Depends: libc-bin (> 2.37) But as @DanielT mentioned this to repair will involve a lot of work. Save data and install anew. – nobody Feb 03 '24 at 11:06
  • @rusty THE OUTPUT OF THE COMMANDS U ASKED ARE ABOVE?PLZ HAVE A LOOK.Synaptics already installed but fixing broken packages with that didn't work as well – THORN HILL Feb 03 '24 at 11:57
  • @THORNHILL I've posted my answer, please check if it helps, and do give your feedback. – rusty Feb 03 '24 at 12:43
  • Does synaptic package manager's *Custom Filters -> Broken* even list any package or is it empty? – rusty Feb 03 '24 at 12:55
  • Can you give me the output of sudo dpkg -l | grep --invert-match '^ii' . I need to check if there are any held packages. Your error messages suggests to check so. – rusty Feb 03 '24 at 12:59
  • See my answer at: https://askubuntu.com/a/1450452/212123 – rusty Feb 03 '24 at 14:04

1 Answers1

0

The output of sudo dpkg -l | grep '^.[^i]' shows you can remove the following packages as done with dpkg --remove ... (these were listed rc). You need to purge them all. Lets remove them with:

sudo dpkg --purge --force-all  linux-image-6.2.0-26-generic linux-image-6.2.0-39-generic linux-modules-6.2.0-26-generic linux-modules-6.2.0-39-generic linux-modules-extra-6.2.0-26-generic linux-modules-extra-6.2.0-39-generic node-esprima node-mime node-source-map node-sprintf-js npm

Now, run these command:

sudo apt-get clean
sudo apt-get update
sudo apt-get --fix-broken install

I'm not sure if the problem will get fixed because the output of sudo dpkg -l | grep '^.[^i]' didn't have much except some remains of old configuration files. Are there more in the output? However, you can give this a try. If it does not help you should backup your data and reinstall your system.

rusty
  • 16,327