3

When I run ldconfig on my Ubuntu box, I get the warning:

/sbin/ldconfig.real: Can't stat /lib/x86_64-linux-gnu

This is not causing any problems yet AFAIK, but I want to 'fix' it, incase it comes back to bite me later on. Does anyone know why I am getting this message - and how do I fix it?

5 Answers 5

5

The other answers didn't work for me, I fixed with below commands

sudo rm /var/lib/dpkg/info/libc-bin.*
sudo apt-get clean
sudo apt-get update
sudo apt install libc-bin
4

I had the same issue, and I believe this is intended to be a directory location for Multiarch support. See file /etc/ld.so.conf.d/x86_64-linux-gnu.conf.

The way I got the error to go away was to create the directory, as it did not exist in my machine. I ran this as root:

mkdir /lib/x86_64-linux-gnu
3

A similar error occurred now on Debian 11 under WSL2. The fix was to create the directory in /usr/local/lib, as mentioned by Miguel Gualdron (sorry, can't comment, and maybe it's better to have this as info for Debian too). The full error message is below.

Setting up libc-bin (2.31-13+deb11u2) ...
Aborted (core dumped)
ldconfig: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
ldconfig: Path `/lib/x86_64-linux-gnu' given more than once
ldconfig: Path `/usr/lib/x86_64-linux-gnu' given more than once
/usr/lib/wsl/lib:
/usr/local/lib:
/lib/x86_64-linux-gnu:
Aborted (core dumped)
dpkg: error processing package libc-bin (--configure):
 installed libc-bin package post-installation script subprocess returned error exit status 134
Errors were encountered while processing:
 libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
2
  • 1
    Just to clarify - You created the folder /usr/local/lib/x86_64-linux-gnu to get this error 134 to go away? - im having the same issue and Im not having any luck
    – Syllogism
    Sep 14, 2022 at 0:55
  • 1
    @Syllogism Yes, the full path is /usr/local/lib/x86_64-linux-gnu. The directory is empty. You can see the initial error and get it from there :: ldconfig: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory Jun 13 at 11:31
2

have the same error in wsl2 debian,fix it by modify the /etc/ld.so.conf.d/x86_64-linux-gnu.conf just leave one row : /usr/lib/x86_64-linux-gnu

0

None of the solutions have had helped me. The only thing that did was simple

sudo apt install libc-bin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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