When I run ldconfig开发者_JAVA百科 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?
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
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)
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
None of the solutions have had helped me. The only thing that did was simple
sudo apt install libc-bin
精彩评论