UBUNTU 20.04 LTS:缺少“lbconfig”和“libc-bin”c 库

UBUNTU 20.04 LTS:缺少“lbconfig”和“libc-bin”c 库

当我在 UBUNTU 20.04 上执行 sudo apt-get update --> 然后执行:sudo apt-get upgrade 时出现了一个令人沮丧的问题。

我最近成功将 PYTHON3.8 升级到了 PYTHON3.10 - 但我不知道这是否导致 ldconfig 文件丢失以及 usr/locale/ 中 sbin 库丢失。

我检查了 3 个根 sbin 位置:/sbin、usr/locale/sbin 和 usr/sbin。/sbin 和 usr/sbin 中有 c 程序实用程序 - 但缺少“ldconfig”实用程序。并且 usr/locale/sbin 目录完全丢失。

当我尝试修复损坏的链接时,Linux 给出以下消息:

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libc-bin
The following NEW packages will be installed:
  libc-bin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/633 kB of archives.
After this operation, 3802 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)

我之前下载过 libc-bin,但没有安装,它是一个名为 .deb 的存档libc-bin_2.31-0ubuntu9.9_amd64.deb,并已成功将其复制到 usr/locale/sbin。当我尝试安装并检查时,存档名称已在 usr/locale/ 中更改为“sbin”,但尚未提取。

是否有人遇到过这个问题并且能够找到不需要放弃 UBUNTU 并进行完全重新安装的解决方案?

最后说明一下:我在 WSL 下的 Microsoft Windows 10 机器上运行 UBUNTU。我仅使用命令行来配置 UBUNTU 20.04 LTS。

还 -

错误消息还提到缺少 PERL5 脚本 -- Encoding.pm - 但我还没有调查过它。

感谢您的天才帮助我摆脱了困境。

相关内容