0

I was installing mysql-server-5.1 on ubuntu and the installation was interrupted. This caused an error and now I can't remove the package or reinstall it.

This is the console output:

amatteo@ubuntu:~$ sudo apt-get install mysql-server-5.1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql-server-5.1 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up mysql-server-5.1 (5.1.49-1ubuntu8.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing mysql-server-5.1 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up man-db (2.5.9-4) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing man-db (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up wamerican (6-3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing wamerican (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up wbritish (6-3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing wbritish (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of language-support-writing-en:
 language-support-writing-en depends on wamerican; however:
  Package wamerican is not configured yet.
 language-support-writing-en depends on wbritish; however:
  Package wbritish is not configured yet.
dpkg: error processing language-support-writing-en (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Setting up wspanish (1.0.25) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing wspanish (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of language-support-writing-es:
 language-support-writing-es depends on wspanish; however:
  Package wspanish is not configured yet.
dpkg: error processing language-support-writing-es (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 mysql-server-5.1
 man-db
 wamerican
 wbritish
 language-support-writing-en
 wspanish
 language-support-writing-es
E: Sub-process /usr/bin/dpkg returned an error code (1)

At first it was just mysql-server-5.1, but now it shows errors on every package I've installed since then.

Any ideas?

Thank you in advanced.

1 Answers1

2

You will need to find and kill the process that is locking /var/cache/debconf/config.dat before you can do anything else.

You can use either

lsof /var/cache/debconf/config.dat

or

fuser -v /var/cache/debconf/config.dat

to find out which process is locking this file and kill to kill that process.

Once you do that you should be able to use apt-get to install mysql-server although I would use Synaptic to view the current status of packages, on filter is called "Broken" which will allow you to tidy up first.