using debian lenny and trying to do a "aptitude -f install"

I get this error message:

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.

UPDATE I managed to get a bit further. New error message is

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

So at least ldconfig is back.

** UPDATE 2 **

newest error message:

unknown initscript, /etc/init.d/glibc.sh not found.

getting there... one step after the other Does anyone of you have any idea as to why and how to repair this?


If you did that as root AND you have /sbin, /usr/sbin and /usr/local/sbin in root's path, you may need to do

  apt-get --reinstall install libc6

to refresh your libc package from scratch and reinstall some corrupted or missing binaries.

The locale seetings are a bit trickier; make sure you've got the 'locales' package installed and maybe the 'locales-all' package as well. You might also try (as root):

dpkg-reconfigure libc6

  • doesn't work for me. Error message: Package libc-bin is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package libc-bin has no installation candidate – yas4891 Aug 19 '10 at 14:25
  • got it solved with a bit of copying files from unpacked libc6 / locales downloads! – yas4891 Aug 19 '10 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.