Errors encountered (by APT/dpkg) while processing linux-image-* packages [closed]
sudo apt-get upgrade
returns:
Errors were encountered while processing:
linux-image-4.8.0-39-generic
linux-image-4.8.0-41-generic
linux-image-generic
linux-firmware
linux-signed-image-4.8.0-39-generic
linux-image-extra-4.8.0-39-generic
linux-image-4.8.0-37-generic
linux-image-extra-4.8.0-37-generic
linux-signed-image-4.8.0-41-generic
linux-signed-image-4.8.0-37-generic
linux-signed-image-generic
linux-image-extra-4.8.0-41-generic
linux-generic
linux-signed-generic
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
I saw the related questions but their errors were a little different. I don't know if that's significant.
For me these two lines helped! Just remove all the linux-extra and linux-extra-image files, which are problematic and old.
For each package:
sudo mv /var/lib/dpkg/info/<PACKAGE-NAME>.* /tmp/
Then:
sudo apt-get autoremove && sudo apt-get autoclean
Then install/update the latest linux image file
sudo apt-get install linux-generic
I found the problem
apt-get not working on Ubuntu 16.04, problems with kernel packages
It comes from some modifications I had to make to use the Teensy microcontroller
It is perfectly possible to have multiple kernels. Since only one is used to boot from the others are automatically inactive. It is an advantage to have multiple kernels in case one fails. I have 4 kernels. Since in your case all kernels fail I suspect your drive or partition is out of space or has not sufficient space left.
Tengasui,
You can hardly work several kernels from single Ubuntu OS, so I recommend that you put obsolete versions "on hold".
Like this:
sudo apt-mark hold **package_name**
for example
sudo apt-mark hold linux-image-4.8.0-39-generic
Probably you'll need only the latest kernel linux-image-4.8.0-41-generic and associated linux-firmware.
Try also:
dpkg --configure -a
Having single isolated error you can post and we can more know than brazillion of combinations of errors in dozen variants of kernels.