问题已解决。我已安装了冲突的软件包。

问题已解决。我已安装了冲突的软件包。

我无意中从系统中删除了一些库,现在我无法安装或删除任何软件包。软件中心和终端中显示的错误是

installArchives() failed: 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.
Can't exec "locale": No such file or directory a /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.
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: warning: 'ldconfig' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
Error in function: 

使用时apt-get install anyPackage出现apt-get install -f anyPackage以下错误:

Reading package lists... Done 
Building dependency tree Reading state information... Done 
You might want to run 'apt-get -f install' to correct these. 
The following packages have unmet dependencies: 
cups : Depends: libc-bin (>= 2.13) E: Unmet dependencies. Try using -f

答案1

问题已解决。我已安装了冲突的软件包。

解决方案

手动下载并解压包

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

将文件复制到您的系统

sudo cp unpackdir/sbin/ldconfig /sbin/

确保包装和包装系统处于良好状态。

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

原始来源请点击 这里

相关内容