Score:-1

How to fix broken libc6 dependencies

je flag

I am currently on Ubuntu 22.04 LTS.

When I run sudo apt-get upgrade I receive the following error:

The following packages have unmet dependencies:
 libcrypt1 : Depends: libc6 (>= 2.25) but it is not installed
 libgcc-s1 : Depends: libc6 (>= 2.35) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

When I attempt apt --fix-broken install and also manually installing libc6 I receive the following error:

Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.35-0ubuntu3.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then I followed the steps I found on this website for that error message:

https://itsfoss.com/dpkg-returned-an-error-code-1/

None of these steps resolved my issue. Is there anyway to fix these broken package dependencies? Thank you in advance for any assistance.

EDIT: Adding the following requested outputs.

sudo apt update:

Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB]
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease                                                                   
Hit:5 https://ppa.launchpadcontent.net/danielrichter2007/grub-customizer/ubuntu jammy InRelease                                    
Fetched 108 kB in 11s (10.2 kB/s)                                                                                                  
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

apt policy libcrypt1:

libcrypt1:
  Installed: 1:4.4.27-1
  Candidate: 1:4.4.27-1
  Version table:
 *** 1:4.4.27-1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

apt policy libgcc-s1:

libgcc-s1:
  Installed: 12.1.0-2ubuntu1~22.04
  Candidate: 12.1.0-2ubuntu1~22.04
  Version table:
 *** 12.1.0-2ubuntu1~22.04 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
        100 /var/lib/dpkg/status
     12-20220319-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

apt policy libc6:

libc6:
  Installed: (none)
  Candidate: 2.35-0ubuntu3.1
  Version table:
     2.35-0ubuntu3.1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
     2.35-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

dpkg -l libc6:

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
+++-==============-============-============-=================================
in  libc6:amd64    <none>       amd64        (no description available)

sudo apt install libc6:i386:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libc6:i386 : Depends: libgcc-s1:i386 but it is not going to be installed
              Depends: libcrypt1:i386 (>= 1:4.4.10-10ubuntu4) but it is not going to be installed
              Recommends: libidn2-0:i386 (>= 2.0.5~) but it is not going to be installed
              Recommends: libnss-nis:i386 but it is not going to be installed
              Recommends: libnss-nisplus:i386 but it is not going to be installed
 libcrypt1 : Depends: libc6 (>= 2.25) but it is not going to be installed
 libgcc-s1 : Depends: libc6 (>= 2.35) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

dpkg -S /lib/x86_64-linux-gnu/libc.so.6:

dpkg-query: warning: files list file for package 'libcrypt1:amd64' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'libgcc-s1:amd64' missing; assuming package has no files currently installed
dpkg-query: no path found matching pattern /lib/x86_64-linux-gun/libc.so.6
cc flag
Do you have both the amd and 32 bit libc6 packages? Check with dpkg -l libc6
LastBucsfan avatar
je flag
I added the output to the original comment. It does not appear I have the 32 bit package.
hr flag
Unless your system is based on an alternative C implementation like musl, it's hard to see how it can function at all if the libraries provided by the libc6 package were missing - perhaps the package has somehow become marked as not installed in the database, but its files are still there? Does `/lib/x86_64-linux-gnu/libc.so.6` exist for example, and if so, what does `dpkg -S /lib/x86_64-linux-gnu/libc.so.6` report?
LastBucsfan avatar
je flag
@steeldriver I don't believe I have any kind of special implementation. I use Grub to dual boot Windows 11 and Ubuntu 22.04. That file does exist. I posted the output in the original post.
karel avatar
sa flag
Does this answer your question? [How do I resolve unmet dependencies after adding a PPA?](https://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa)
LastBucsfan avatar
je flag
@karel unfortunately none of those corrected the issue either. Most of those commands I had already tried.
cc flag
Try the path /lib/x86_64-linux-gnu instead of /lib/x86_64-linux-gun on that last dpkg command
LastBucsfan avatar
je flag
@ubfan1 that was just a typo in the post. Same output.
Score:1
je flag

My solution ended up being to clean install Ubuntu 23.04. At this point it was much more efficient. I have Windows, Ubuntu, and my data all on separate drives, so nothing important is lost and setting Ubuntu up is fast and easy.

Score:0
cc flag

To install the missing 32 bit libc6, run:

sudo apt install libc6:i386
LastBucsfan avatar
je flag
This resulted in an unmet dependencies error as well. I posted the output in the original post.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.