Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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  line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/s           hare/perl5/Debconf/ 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/ line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/ 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/ not found.

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

share|improve this question
this website has helped me a bit along the road:… – yas4891 Aug 19 '10 at 14:22
up vote 2 down vote accepted

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

share|improve this answer
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
Thanks yet again! – yas4891 Aug 19 '10 at 17:10
got it solved with a bit of copying files from unpacked libc6 / locales downloads! – yas4891 Aug 19 '10 at 17:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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