Score:0

E: dpkg was interrupted… run 'sudo dpkg --configure -a'

jp flag
wsm

I was trying to deploy a Django project on AWS Deep Learning AMI (Ubuntu 18.04) Version 48.0. When I try to install packages or upgrade I get this.

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

And When I run sudo dpkg --configure -a, nothing happens after this and the terminal gets frozen.

Setting up linux-headers-5.4.0-1055-aws (5.4.0-1055.58~18.04.1) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-1055-aws

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' -j32 NV_EXCLUDE_BUILD_MODULES='nvidia-drm ' KERNEL_UNAME=5.4.0-1055-aws IGNORE_CC_MISMATCH='1' modules.....

Getting the same when trying to upgrade.

ubuntu@ip-172-31-38-134:~$ sudo apt-get install supervisor
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
ubuntu@ip-172-31-38-134:~$ sudo apt update
Hit:1 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64  InRelease
Hit:2 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64  InRelease
Hit:3 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64  InRelease
Hit:4 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu bionic InRelease
Hit:5 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:6 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:7 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:8 https://apt.repos.neuron.amazonaws.com bionic InRelease
Hit:9 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
ubuntu@ip-172-31-38-134:~$ sudo apt upgrade
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
ubuntu@ip-172-31-38-134:~$

EDIT:
When I run sudo dpkg --configure -a, nothing happens after this and the terminal gets frozen.

Setting up linux-headers-5.4.0-1055-aws (5.4.0-1055.58~18.04.1)...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 5.4.0-1055-aws   
Kernel preparation unnecessary for this kernel.  
Skipping...  
Building module: cleaning build area...  
'make' -j32 NV_EXCLUDE_BUILD_MODULES='nvidia-drm ' KERNEL_UNAME=5.4.0-1055-aws IGNORE_CC_MISMATCH='1' modules...
heynnema avatar
ru flag
Turn off Secure Boot. Remove the Nvidia driver, or upgrade it to the latest version, and then retry Django.
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.