Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem. I open the SYNAPTIC PACKAGE MANAGER and an error message appear and show me that there is a BROKEN PACKAGE on my system. I am going to FIX IT on Terminal by typing 'sudo apt-get install -f' and Terminal show me:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
0 upgraded, 0 newly installed, 1 to remove and 172 not upgraded.
1 not fully installed or removed.

After this operation, 13.7MB disk space will be freed.
Do you want to continue? [Y/n]? Y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE: = (unset),
    LC_ALL = (unset),
    LANG = "el_GR.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C")
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/ line 16.

Use of uninitialized value $Debconf::Encoding:charmap in scalar chomp at /usr/share/perl5/Debconf/ 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)
share|improve this question
Why did't you try to fix using Synaptic Package Manager itself? What was the problem? It did not work? – Saurav Kumar Sep 3 '13 at 10:41
I am trying to fix the package many times using Synaptic Package Manager but no changes occurred and the package doesn't fix and doesn't remove from my system. – NIKOS ANTONIOU Sep 3 '13 at 10:48
Oh.. Are you able to upgrade you system? try these commands: sudo apt-get update, sudo apt-get dist-upgrade and sudo apt-get upgrade one by one all whether they pass or fail. – Saurav Kumar Sep 3 '13 at 11:00
Nothing i tried the 3 commands (update,upgrade,dist-upgrade)but no changes occurred. Nothing,nothing,nothing!!! – NIKOS ANTONIOU Sep 3 '13 at 11:08
Uff!! Why it is so difficult to fix broken packages in your case.. Ok.. I'm marking your question as favorite and also giving it thumbs up so that it will catch some extra viewer. – Saurav Kumar Sep 3 '13 at 11:15

I don't know what happened, but let's try to satisfy apt:

sudo mkdir -p /var/cache/apt/archives/partial
sudo chown root:root  /var/cache/apt/archives/partial
sudo chmod 755 /var/cache/apt/archives/partial
sudo apt-get update && sudo apt-get install -f

See if works.

share|improve this answer
What is the other error? – Frantique Sep 3 '13 at 9:09

Ok, first of all, STOP. Whenever you get a broken package, issuing commands, without understanding what is being done, is VERY BAD IDEA. First of all, lets put your installation the most by default possible:

sudo rename 's/\.list/\.list\.disable/' /etc/apt/sources.list.d/*.list
sudo mkdir -p /var/cache/apt/archives/partial
sudo apt-get update
sudo apt-get -f upgrade
sudo apt-get -f install libc6-dev

Now, lets fix the perl warnings:

sudo locale-gen el_GR.UTF-8

Then lets try to use apt-get -f install:

sudo apt-get -f install

Now, no error should be displayed.

share|improve this answer
I have tried these commands but no changes occurred. My problem doesn't solve yet. The package doesn't fix and doesn't remove yet from my system. And the perl warnings doesn't fix. Also, my sytem doesn't update/upgrade. I can't anymore! I want so much to fix thie problem but nothing. :( :( :( – NIKOS ANTONIOU Sep 4 '13 at 9:20
@NIKOSANTONIOU Ok, first, don't panic. There has been system in more sorry state, and they got fixed after a bit of thickening. Could you write these commands, one line at time, then copy the output/result and paste it in your question. Please, don't use the comments nor answers section for providing the information. – Braiam Sep 4 '13 at 11:39

This problem has been solved by installing the conflicting package.


Download and extract the package manually

apt-get download conflicting-pakage
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 conflicting-pakage
sudo apt-get install -f

for original source click here!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.