加载共享库时出错:libc.so.6:无法打开共享对象文件:没有此文件或目录

加载共享库时出错:libc.so.6:无法打开共享对象文件:没有此文件或目录

我正在调试我的系统(debian linux)上的错误,其中我将libc.so.6文件的一部分重命名为其他名称。

$ sudo mv libc.so.6 libc-2.28.so.6

现在我的 bash 命令都无法运行了。

$ ls
ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
$ sudo mv libc-2.28.so.6 libc.so.6
sudo: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

我该如何修复这个问题?

该文件存在,但我无法将其重命名:

$ ./libc-2.28.so.6
GNU C Library (Debian GLIBC 2.28-10+deb10u2) stable release version 2.28.
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 8.3.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.

相关内容