Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED]How to recover from dpkg hang

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
AverageGuy
Posts: 3
Joined: 2018-02-06 14:07

[SOLVED]How to recover from dpkg hang

#1 Post by AverageGuy »

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
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: How to recover from dpkg hang

#2 Post by bw123 »


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.
resigned by AI ChatGPT

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: How to recover from dpkg hang

#3 Post by debiman »

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
AverageGuy
Posts: 3
Joined: 2018-02-06 14:07

Re: How to recover from dpkg hang

#4 Post by AverageGuy »

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
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: How to recover from dpkg hang

#5 Post by stevepusser »

What does

Code: Select all

apt-cache policy
report? in code box, please
MX Linux packager and developer

User avatar
AverageGuy
Posts: 3
Joined: 2018-02-06 14:07

[SOLVED] Re: How to recover from dpkg hang

#6 Post by AverageGuy »

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.

Post Reply