9

Long story short, I tried installing something via apt-get install and accidentally terminated the process through terminal. I now can't use apt-get install, Ubuntu Software Center, etc. I tried running sudo apt-get clean and sudo apt-get autoclean, but to no avail.

I then tried running sudo apt-get install -f, and got the following results:

    Do you want to continue [Y/n]? y
    debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 216122 files and directories currently installed.)
Preparing to replace libc6 2.15-0ubuntu10.2 (using .../libc6_2.15-0ubuntu10.3_i386.deb) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing /var/cache/apt/archives/libc6_2.15-0ubuntu10.3_i386.deb (--unpack): subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.15-0ubuntu10.3_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I fix this error, or at least "reset" apt-get so I can install things again?

2 Answers 2

8

You can fix this by just run dpkg --purge --force-depends "package_name" to purge a broken package then you have to run apt-get autoremove and apt-get -f install After this, the problem will be solve.

1
  • that does removes every thing that the package brought along....but does not helps with installation error...
    – ronit
    May 10, 2021 at 17:48
3

Just reboot the machine. Whatever is using that file should no longer be using it after a reboot. Then run sudo apt-get install -f to repair it. That should work for ya.

1
  • 1
    Thank you so much! I had rebooted the machine but I forgot to run install -f afterwards.
    – element119
    Nov 3, 2012 at 2:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .