Score:0

How to fix the base-passwd error

tc flag

I'm a complete newbie in linux ubuntu ver 21.04. While I was doing sudo apt upgrade it showed me the error:

debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another 
process: Resource temporarily unavailable
Setting up base-passwd (3.5.49ubuntu1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another p
rocess: Resource temporarily unavailable
dpkg: error processing package base-passwd (--configure):
installed base-passwd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 base-passwd
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there any proper way to fix this?

And sorry for my bad english..

Score:0
it flag

A configuration file may be "locked" to prevent (among cooperative processes) simultaneous access.

Sometimes, old lock files don't get cleaned up (system crash, application failure).

Check to see if any active processes have the file, or its lock file open with sudo lsof /var/cache/debconf/config.dat{,.lock} or sudo lsof +D /var/cache/debconf/.

Be aware that the other process (the one holding the lock) may have finished its task, and released the lock while you were reading this.

If lsof shows no processes having the files open, you probably have a "stale" lock. Clean it up by sudo /bin/rm /var/cache/debconf/config.dat.lock.

Score:0
it flag

A configuration file may be "locked" to prevent (among cooperative processes) simultaneous access.

Sometimes, old lock files don't get cleaned up (system crash, application failure).

Check to see if any active processes have the file, or its lock file open with sudo lsof /var/cache/debconf/config.dat{,.lock} or sudo lsof +D /var/cache/debconf/.

Be aware that the other process (the one holding the lock) may have finished its task, and released the lock while you were reading this.

If lsof shows no processes having the files open, you probably have a "stale" lock. Clean it up by sudo /bin/rm /var/cache/debconf/config.dat.lock.

If lsof does show processes that have the files open, DO NOT delete the lock. Wait for the process to finish, or kill it.

arik avatar
tc flag
It didn't worked. But I found out the other packages were causing problems: libpam-systemd:amd64, ubuntu-advantage-tools, xserver-xorg-legacy, base-passwd. I tried all of your commands but none of them worked. sorry..
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.