[SOLVED]How to recover from dpkg hang

If none of the more specific forums is the right place to ask

[SOLVED]How to recover from dpkg hang

Postby AverageGuy » 2018-02-06 14:12

I was installing an application that installs a number of packages. Somewhere in the middle of this, the process hung. I had to reboot to get the system unstuck and now dpkg hangs.

root@debian:~# dpkg --configure -a
Setting up haveged (1.9.1-1) ...

It's stuck there for way too long. If I kill it and remove the lock and try again, it just hangs again. I can no longer do anything dpkg related because of this error everytime.

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

Other than reinstalling debian, is there something I can do?
Thanks,
Jim.
Last edited by AverageGuy on 2018-02-07 15:55, edited 1 time in total.
User avatar
AverageGuy
 
Posts: 3
Joined: 2018-02-06 14:07

Re: How to recover from dpkg hang

Postby bw123 » 2018-02-06 15:25


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

Other than reinstalling debian, is there something I can do?


I've been there, long time ago. From what I recall I read the man page for dpkg first, then second. It's a long read, but before typing in commands it's really good to understand what they are going to do.

I used the non-destructive actions like -V and -C to gather information.

I think I probably purged a package, or maybe reinstalled pkgs that could not be purged without --force* ing the action.

I probably made sure the problem could not be solved by aptitude pkg manager first.
User avatar
bw123
 
Posts: 3084
Joined: 2011-05-09 06:02
Location: TN_USA

Re: How to recover from dpkg hang

Postby debiman » 2018-02-06 18:10

when i was in a similar situation, i had to pair this command:
AverageGuy wrote:root@debian:~# dpkg --configure -a

with 'apt-get install -f'.
i think i alternated them twice just to make sure.
User avatar
debiman
 
Posts: 2408
Joined: 2013-03-12 07:18

Re: How to recover from dpkg hang

Postby AverageGuy » 2018-02-07 00:49

I attempted apt-get install -f but it hangs at the same place. Same thing for dpkg --configure -a. It's stuck at that.
User avatar
AverageGuy
 
Posts: 3
Joined: 2018-02-06 14:07

Re: How to recover from dpkg hang

Postby stevepusser » 2018-02-07 01:04

What does

Code: Select all
apt-cache policy


report? in code box, please
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.2, Pale Moon 27.9.3, wine-staging 3.10, QuiteRSS 0.18.11, Linux kernel 4.17, Krita 4.0.4
User avatar
stevepusser
 
Posts: 9648
Joined: 2009-10-06 05:53

[SOLVED] Re: How to recover from dpkg hang

Postby AverageGuy » 2018-02-07 15:52

In looking at the output of ps -elf I saw that systemd was apparently involved, so I did a
Code: Select all
journalctl -n 30

The error message led me to search for that error message and I found a post that gave me the fix.

This is a jessie instance running in a LXD container. The post said to run the following command on the host:
Code: Select all
lxc config set guest ‘security.privileged’ true

I did and rebooted the debian instance and all seems to be well. I finished the installation of the app.

Thanks,
Jim.
User avatar
AverageGuy
 
Posts: 3
Joined: 2018-02-06 14:07


Return to General Questions

Who is online

Users browsing this forum: tcat and 8 guests

fashionable