不小心删除了 libc-bin, 使用apt-get install 命令都会报错,错误如下:
1 Can‘t exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16. 2 Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
解决办法:
1下载libc-bin扩展包
1 apt-get download libc-bin 2 dpkg -x libc-bin*.deb unpackdir/
2复制文件到系统
1 sudo cp unpackdir/sbin/ldconfig /sbin/
3修复系统状态
1 sudo apt-get install --reinstall libc-bin 2 sudo apt-get install -f
对于丢失ldconfig的情况也同样试用。
时间: 2024-10-08 04:45:07