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,769

1 Answers1

1

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,917