Fix the Error "debconf DbDriver "config" /var/cache/debconf/config.dat is locked by another process Resource temporarily unavailable

Posted on: Tue Jun 02 2020 05:30:00 GMT+0530 (India Standard Time)

You have encountered the above error in Debian or Debian based GNU/Linux Distribution.

This may cause problems like:

- errors in sudo apt-get update, sudo apt-get upgrade, sudo apt-get install, and other processes.
- dpkg: error processing package
- post-installation script subprocess returned error exit status 1
- Errors were encountered while processing
- E: Sub-process /usr/bin/dpkg returned an error code (1)

Solution

sudo fuser -v /var/cache/debconf/config.dat
  USER        PID ACCESS COMMAND
  sudo kill PID
  or
  sudo kill -9 PID