2

I interrupted an installation, and now apt and apt-get don't work with any arguments. I always get the same error:

E: dpkg execution was interrupted, you must manually run "sudo dpkg --configure -a" to correct the problem.

EDIT : I have tried to do sudo dpkg --configure -a and it only did

Setting up cento (1.5.181022-373) ...
Making the /var/log/cento directory...
(Re)Starting cento...
^Cdpkg: error processing package cento (--configure):
 installed cento package post-installation script subprocess was interrupted
Setting up ntopng (3.7.181022-5357) ...
Rebuilding ld cache...
(Re)Starting ntopng...
^Cdpkg: error processing package ntopng (--configure):
 installed ntopng package post-installation script subprocess was interrupted
Setting up pfring-dkms (7.3.0) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package pfring-dkms (--configure):
 installed pfring-dkms package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
 cento
 ntopng
 pfring-dkms

EDIT 2: I have tried sudo apt install --reinstall cento and this is the exit:

 Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 9 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for cento:amd64

EDIT 3: I have made sudo fuser -v /var/cache/debconf/config.dat

                     USUARIO        ORDEN DE ACCESO PID
/var/cache/debconf/config.dat:
                     root       2845 F.... frontend

Then I made sudo kill 2845(I do not get an answer)
Then I made sudo kill -9 2845

kill: (2845): No such process

Then I tried sudo apt autoremove:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up cento (1.5.181022-373) ...
Making the /var/log/cento directory...
(Re)Starting cento...

Progress: [  0%] [.............................................................] 

And it stops there and doesn't do any more

lujoselu
  • 23
  • 5
  • 1
    Hello and welcome to Ask Ubuntu! Have you tried `sudo dpkg --configure -a` as suggested in the error? – Daniele Santi Oct 22 '18 at 15:16
  • Look up that error. Easy fix, you caused it when you CTRL+C. Don't let it distract from your current problem. Edit your question instead of putting information in comments. What is 'cento'? – user535733 Oct 22 '18 at 15:41
  • Please also prepend `LC_ALL=C` to your commands so they produce English text. – fkraiem Oct 22 '18 at 15:43
  • 4
    Does this answer your question? ["debconf: DbDriver "config": config.dat is locked by another process: Resource temporarily unavailable" while installing packages](https://askubuntu.com/questions/136881/debconf-dbdriver-config-config-dat-is-locked-by-another-process-resource-t) – karel Dec 10 '19 at 05:56

1 Answers1

3

A solution to this locking problem is detailed in the wiki:

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

Will show you what process is holding the lock:

USER        PID         ACCESS COMMAND
/var/cache/debconf/config.dat:
root      18210 F.... dpkg-preconfigu

Then you simply need to note down the PID and kill it like so:

sudo kill PID 
sudo kill -9 PID  # if the first doesn't work

Answered originally by Sayed Jalil Hassan

Anunay
  • 176
  • 5
  • I edited the question with the result and I have not solve it – lujoselu Oct 22 '18 at 16:15
  • @lujoselu ``sudo dpkg --configure -a`` after this, No answer means you have successfully killed the program. Also tell us the program that was accessing that file. – Anunay Oct 22 '18 at 16:55
  • I have already solved thank you. Also I do not know how to mark a question as answered – lujoselu Oct 22 '18 at 17:37