10

After upgrading to Ubuntu 16.04, I cannot update my system. After the usual:

apt-get upgrade

I get this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libc-bin (2.23-0ubuntu3) ...
Segmentation fault (core dumped)
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
Segmentation fault (core dumped)
dpkg: error processing package libc-bin (--configure):
 subprocess installed post-installation script returned error exit status 139
Errors were encountered while processing:
 libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any ideas on how to fix this? apt-get clean and apt-get -f install did nothing.

2
  • Can you please post the complete output.
    – g_p
    Jul 31, 2016 at 14:32
  • I just updated the output.
    – Molorius
    Aug 1, 2016 at 15:23

6 Answers 6

5

Here the reason seemed to be a corrupted /var/cache/ldconfig/aux-cache.

The solution was to do (as root):

rm /var/cache/ldconfig/aux-cache

And afterwards execute

/sbin/ldconfig
2
  • This worked for me, although he second command did not exist for me.
    – Mark Deven
    Apr 26, 2020 at 16:13
  • I had to run /sbin/ldconfig.real on Ubuntu 20.04 then the installation worked
    – Benjamin
    Mar 27 at 15:16
3

I used to have the same error here, I did the following command:

 sudo apt-get --reinstall install libc-bin

And it worked, it reinstalled the libc-bin package and solved the issue.

Hope it helps

4
  • 3
    @Vitor Abella </br> I am getting the same error. But when I am runninng your solution, I am getting > E: Internal Error, No file name for libc-bin:amd64
    – Erdnase
    Oct 14, 2017 at 10:07
  • 2
    I get the same error as @Erdnase No file name for libc-bin:amd64
    – Mark Deven
    Apr 26, 2020 at 16:11
  • 1
    i get same error :( Sep 17, 2021 at 12:34
  • I get the same error as well. Feb 28 at 0:26
2

If it is in WSL, try (tks lifesaver.codes)

sudo mv /var/lib/dpkg/info/libc-bin.* /tmp/

sudo dpkg --remove --force-remove-reinstreq libc-bin

sudo dpkg --purge libc-bin

sudo apt install libc-bin

sudo mv /tmp/libc-bin.* /var/lib/dpkg/info/
1
  • This fixed the issue for me.
    – gdf31
    Aug 31 at 19:35
0

I had this problem, it turned out to be limits related. This resolved it:

limit datasize 2000M
0

I had to run sudo rm /var/cache/ldconfig/aux-cache and sudo /sbin/ldconfig.real on WSL Ubuntu 20.04 .

0

With rm aux-cache i got

/lib/x86_64-linux-gnu:

Aborted (core dumped)

and only https://askubuntu.com/a/1411267/1423238 helps

1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Pilot6
    Jun 24 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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