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...