0

I have acidently removed some libraries from system and now I does not install or remove any package. Error shown in Software center and in terminal is

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: 

When using apt-get install anyPackage and apt-get install -f anyPackage i get the following error:

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
Alvar
  • 17,058
  • what happens if you type sudo apt-get update && sudo apt-get upgrade in the terminal? (The commands only update your software if they work) If that works try sudo apt-get install htop (small system monitor program, to test if apt-get work.) – Alvar Jan 11 '15 at 20:07
  • it produce this error. I have also tried using -f it produce same error as given above. 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.
    – Talha Junaid Jan 11 '15 at 20:24
  • Open the terminal and run the following the following command: sudo apt-get install -f && sudo apt-get install -f libc-bin. I don't think it will fix everything, but you may get a new error message that will tell you more about what packages are missing. – karel Jan 11 '15 at 21:10
  • none of these worked – Talha Junaid Jan 11 '15 at 21:39
  • well, what happened? – Alvar Jan 11 '15 at 21:41
  • I have accidently removed a system package due to which this is broken – Talha Junaid Jan 11 '15 at 22:08

1 Answers1

-1

May problem has been sesolved. I have installed the conflicting package.

Solution

Download and extract the package manually

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

for original source click here!

  • seriously why is this community wiki? it's perfectly fine to answer your own question... – Alvar Jan 12 '15 at 07:06