oompahloompah
oompahloompah

Reputation: 9343

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

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?

Upvotes: 3

Views: 14145

Answers (5)

Sunghoon Cho
Sunghoon Cho

Reputation: 156

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

Upvotes: 7

user1941116
user1941116

Reputation: 1

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

sudo apt install libc-bin

Upvotes: 0

a ad
a ad

Reputation: 31

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

Upvotes: 3

Boyan Alexiev
Boyan Alexiev

Reputation: 81

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)

Upvotes: 3

Miguel Gualdron
Miguel Gualdron

Reputation: 119

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

Upvotes: 4

Related Questions