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) mitja@cube:~$ printenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
解决办法:
由于报出缺少 "ldconfig"这个文件,所以可以:aptitude download libc-bin 下载libc-bin(ldconfig文件在这个里面)
然后dpkg -x libc-bin*.deb unpackdir/; cp unpackdir/sbin/ldconfig /sbin/;
最后sudo apt-get install -f;
就能够修复,然后就能够正常apt-get install
转自:http://my.oschina.net/u/589963/blog/135107
回复:
本人采取以上办法后导致左侧启动器消失,中文不识别出现乱码等问题,比较复杂,鉴于本人非专家,不知是何原因。
以下是解决:找不到ldconfig文件的问题:
参考:http://ubuntuforums.org/showthread.php?t=1266104
1. Get hold of ldconfig & ldconfig.real from the correct version:
Code:
aptitude download libc-bin
Code:
dpkg-deb -x libc-bin.deb libc-bin-unpacked/
Code:
sudo cp libc-bin-unpacked/sbin/ldconfig* /sbin/
Code:
sudo apt-get -f install sudo dpkg-reconfigure libc6 sudo dpkg-reconfigure libc6-i386 sudo apt-get install --reinstall libc6 sudo apt-get install --reinstall libc6-i386