1

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:
   libc6-dev
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/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)
5
  • Why did't you try to fix using Synaptic Package Manager itself? What was the problem? It did not work? Sep 3, 2013 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.
    – user188933
    Sep 3, 2013 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. Sep 3, 2013 at 11:00
  • Nothing i tried the 3 commands (update,upgrade,dist-upgrade)but no changes occurred. Nothing,nothing,nothing!!!
    – user188933
    Sep 3, 2013 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. Sep 3, 2013 at 11:15

3 Answers 3

0

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.

1
  • What is the other error?
    – Frantique
    Sep 3, 2013 at 9:09
0

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.

2
  • 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. :( :( :(
    – user188933
    Sep 4, 2013 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, 2013 at 11:39
0

This problem has been solved by installing the conflicting package.

Solution

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!

You must log in to answer this question.