使用 debian lenny 并尝试执行“aptitude -f install”
我收到此错误信息:
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encod ing.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/s hare/perl5/Debconf/Encoding.pm line 17.
dpkg: `ldconfig' not found on PATH.
dpkg: 1 expected program(s) not found on PATH.
NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install. Trying to recover:
dpkg: `ldconfig' not found on PATH.
更新 我设法走了一段路。新的错误消息是
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.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
因此至少 ldconfig 又回来了。
** 更新 2 **
最新的错误信息:
unknown initscript, /etc/init.d/glibc.sh not found.
到达那里......一步一步地你们有人知道为什么以及如何修复这个问题吗?
答案1
如果你以 root 身份执行此操作,并且 root 路径中有 /sbin、/usr/sbin 和 /usr/local/sbin,则可能需要执行
apt-get --reinstall install libc6
从头开始刷新你的 libc 包并重新安装一些损坏或丢失的二进制文件。
区域设置有点棘手;请确保您已安装“locales”包,并且可能还安装了“locales-all”包。您也可以尝试(以 root 身份):
dpkg-reconfigure libc6