Ubuntu kernel on a remote server (14.04) was downgraded from 119 (apparently there was a glitch that damaged nvidia drivers) to 4.4.0-116. Whenever I'm trying to install anything, I keep getting the error message
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-119-generic:
linux-image-extra-4.4.0-119-generic depends on linux-image-4.4.0-119-generic; however:
Package linux-image-4.4.0-119-generic is not configured yet
dpkg: error processing package linux-image-generic-lts-xenial (--configure)
and similar.
Is there any way to fix it without purging anything? I'm not a big Linux (let alone server) expert, so just don't want to crash anything and make things even worse.
EDIT:
sudo dpkg --configure -a
Setting up linux-image-4.4.0-119-generic (4.4.0-119.143~14.04.1) ...
Internal Error: Could not find image (/boot/vmlinuz-4.4.0-119-generic)
dpkg: error processing package linux-image-4.4.0-119-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic-lts-xenial:
linux-image-generic-lts-xenial depends on linux-image-4.4.0-119-generic; however:
Package linux-image-4.4.0-119-generic is not configured yet.
dpkg: error processing package linux-image-generic-lts-xenial (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-119-generic:
linux-image-extra-4.4.0-119-generic depends on linux-image-4.4.0-119-generic; however:
Package linux-image-4.4.0-119-generic is not configured yet.
dpkg: error processing package linux-image-extra-4.4.0-119-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-xenial:
linux-generic-lts-xenial depends on linux-image-generic-lts-xenial (= 4.4.0.119.100); however:
Package linux-image-generic-lts-xenial is not configured yet.
dpkg: error processing package linux-generic-lts-xenial (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-4.4.0-119-generic
linux-image-generic-lts-xenial
linux-image-extra-4.4.0-119-generic
linux-generic-lts-xenial
sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-4.4.0-119-generic (4.4.0-119.143~14.04.1) ...
Internal Error: Could not find image (/boot/vmlinuz-4.4.0-119-generic)
dpkg: error processing package linux-image-4.4.0-119-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-119-generic:
linux-image-extra-4.4.0-119-generic depends on linux-image-4.4.0-119-generic; however:
Package linux-image-4.4.0-119-generic is not configured yet.
dpkg: error processing package linux-image-extra-4.4.0-119-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic-lts-xenial:
linux-image-generic-lts-xenial depends on linux-image-4.4.0-119-generic; however:
Package linux-image-4.4.0-119-generic is not configured yet.
linux-image-generic-lts-xenial depends on linux-image-extra-4.4.0-119-generic; however:
Package linux-image-extra-4.4.0-119-generic is not configured yet.
dpkg: error processing package linux-image-generic-lts-xenial (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-xenial:
linux-generic-lts-xenial depends on linux-image-generic-No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
lts-xenial (= 4.4.0.119.100); however:
Package linux-image-generic-lts-xenial is not configured yet.
dpkg: error processing package linux-generic-lts-xenial (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-4.4.0-119-generic
linux-image-extra-4.4.0-119-generic
linux-image-generic-lts-xenial
linux-generic-lts-xenial
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-get -f install
anddpkg --configure -a
in your answer. Feel free to use pastebin if it's a lot of output. Also, if apt-get -f install is asking to remove things and you are not comfortable with them, you can say no, but still put up the output. – dpb Apr 10 '18 at 02:25