Ubuntu Linux Error Message : debconf: DbDriver “config”: /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable

Posted on

This article is also an article related to the error message triggered upon ubuntu package management process which in the context of this article it is removing a certain package. Precisely the error is shown in the title of this article which is “debconf: DbDriver “config”: /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable”. The following output will give more detailed output on the actual process which is in the end triggering the error message as specified in the title of this article :

root@hostname:~# apt remove --purge mysql-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mysql-server-5.7*
0 upgraded, 0 newly installed, 1 to remove and 46 not upgraded.
1 not fully installed or removed.
After this operation, 48,4 MB disk space will be freed.
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 ... 921854 files and directories currently installed.)
Removing mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package mysql-server-5.7 (--purge):
subprocess installed pre-removal script returned error exit status 1
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@hostname:~#

The above output process is an attempt to remove mysql-server-5.7 from Ubuntu Linux Operating System because of dependency problem. It happened at the time when the update process for MySQL Database Server stumbled a bit so every related MySQL Database Server package must be removed in order to have a clean and fresh installation of a new MySQL Database Server version. But the above error occurred after the error triggered in this article titled ‘Ubuntu Error Message : Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable)’ in this link has already successfully solved.

Execute the following command in order to solve the above problem triggered :

root@hostname:~# fuser -v /var/cache/debconf/config.dat

Below is the output of the actual process of the execution after the above command is being carried out in the bash prompt :

root@hostname:~# apt remove --purge mysql-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mysql-server* mysql-server-5.7*
0 upgraded, 0 newly installed, 2 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 48,5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 921854 files and directories currently installed.)
Removing mysql-server (5.7.20-0ubuntu0.16.04.1) ...
Removing mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Purging configuration files for mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
root@hostname:~#

So, executing the command which is specified as in ‘fuser -v /var/cache/debconf/config.dat ‘ really helps on solving the problem. It shown in the manual page as being a command for identifying the processes using files or sockets. So, the files specified in ‘/var/cache/debconf/config.dat ‘ is being identified as process in order for the utilization using ‘apt’ command is successfully carried out.

One thought on “Ubuntu Linux Error Message : debconf: DbDriver “config”: /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable

Leave a Reply