1

I'm still very much a newbie, so please be gentle with me.

We had a power cut while running apt-get dist-upgrade [Raspian Jessie] .

When the power came back on, I ran apt-get dist-upgrade again but got

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

The manual run of dpkg showed:

Setting up libgdk-pixbuf2.0-0:armhf (2.28.2-1rpi4rpi1) ...

and then the pi then hangs.

I Removed all the files inside /var/lib/dpkg/updates and ran sudo apt-get dist-upgrade again.

Same result and the pi hangs.

Is there a super-hero out there that knows how I resolve this?

  • How long did you leave it for? – ctrl-alt-delor Jul 2 '18 at 22:07
  • Interesting you should ask that. I was wondering if I was being impatient. I left it for about 35 minutes. I also found that the network connection is lost after a few seconds. This made me think that the pi had stopped. – Rob Jul 3 '18 at 5:13
  • This seems to be a duplicate of Upgrade or install using apt-get results in dpkg error. Try the suggestions on that answer. – Ingo Jul 3 '18 at 10:23
0

The error message tells you exactly what to do.

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

  • I believe this is what Rob did in the bit starting with "The manual run of dpkg showed", but it is hanging; that's the problem that this question is asking about. – Aurora0001 Jul 2 '18 at 14:30
  • 1
    Thank you Aurora0001 that is exactly my problem. I already did as the error message instructed. It started the first process and hung. So can anybody tell me if or how I can resolve this? – Rob Jul 2 '18 at 20:07
0

Removing power while the Pi is actively updating can cause a wide range of damage to your filesystem.

If following the instruction does not resolve the issue I suggest you restore from your backup. This is what most of us would do.

It is always prudent to make a backup before major updates on ANY computer, not just the Pi.

You could try sudo apt-get clean but repairing these issues is far from simple.

In some cases purging and re-installing damaged packages can help.

PS Jessie in no longer supported. If you have to re-install you would be better to install Stretch.

  • Do a file-system check to check file-system. Note this may not be the problem. For the future configure the File-system to be fully journaled. This will make it (the file-system) more robust to power off. – ctrl-alt-delor Jul 3 '18 at 7:36
  • @ctrl-alt-delor Raspbian is journalled by default, and automatically checks on boot. Journalling IS NOT a protection for all errors. – Milliways Jul 3 '18 at 7:55
  • @Milliways thank you for your advice. I would love to restore from a backup, but last year made my brain go fuzzy (holding hands with a loved one through chemotherapy can do that to you) and relevant back ups don't exist. Hence the need to try and sort this in a simple way (brain still fuzzy). The unfuzzy part of my brain is worried that I will just make things worse!!!! – Rob Jul 4 '18 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.