воскресенье, 21 сентября 2014 г.

DEBIAN 7 - Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm

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: `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)

for fix

Download and extract the package

apt-get download libc-bin
dpkg -x libc-bin*.deb unpackdir/

Copy the file to your system

sudo cp unpackdir/sbin/ldconfig /sbin/

Make sure the package and package system is in a good state.

sudo apt-get install --reinstall libc-bin
sudo apt-get install -f

Futher errors after this indicates something else is wrong.