Fresh install (Ubuntu 16.04 LTS) I'm unable to update or install anything via apt
. I can run apt update
fine but if I follow that with either apt upgrade
or apt dist-upgrade
it always (I've tried doing so after countless reboots, as well as from recovery mode) results in:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
If I run that it always does the following and just hangs indefinitely:
Setting up grub-efi-amd64 (2.02~beta2-36ubuntu3.12) ...
Installing for x86_64-efi platform.
Installation finished. No error reported.
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-28-generic
Found initrd image: /boot/initrd.img-4.10.0-28-generic
uname -r
shows it's running 4.10.0-35-generic
so I'd be fine removing 4.10.0-28-generic
since that's where it always hangs but I'm unable to purge it because that just results in apt purge
hanging when it gets to Found initrd image: /boot/initrd.img-4.10.0-28-generic
.
I've tried every possible ordering of the following without success
sudo dpkg --configure -a
sudo apt install -f
sudo apt clean
sudo apt update
sudo apt upgrade|dist-upgrade|full-upgrade
This is a fresh install so I'm not worried about any "nuclear" options that would result in data loss (i.e. I have no data to lose). I have tried using boot-repair but it never completed (it said it may take a few minutes but I left it running for hours).
I realize the similarities between this question and both E: dpkg was interrupted... run 'sudo dpkg --configure -a' and dpkg --configure -a hangs when found initrd image but none of the answers have helped.
apt
instead ofapt-get
andfull-upgrade
instead ofdist-upgrade
for any 16.04+. Now, reboot. Then runsudo apt update
followed bysudo apt full-upgrade
and [edit] and post the full error messages if any. – Sep 30 '17 at 14:07apt
vsapt-get
but nevertheless I have been runningapt
, the code block above with the apt-gets was copied from a thread, but I'll edit so it showsapt
. As forfull-upgrade
that results in the same error asupgrade
ordist-upgrade
(thedpkg was interrupted...
one shown near the top of my question). – frostmatthew Sep 30 '17 at 14:17