mamdouh asked this 6 months ago

unmet dependencies error while upgrading Ubuntu 16.04.3

I am trying to upgrade certbot on Ubuntu 16.04.3 LTS using apt-get. I get unmet dependencies error:
$ sudo apt-get install --only-upgrade certbot
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 certbot : Depends: python3-certbot (= 0.31.0-1+ubuntu16.04.1+certbot+1) but 0.22.2-1+ubuntu16.04.1+certbot+1 is to be installed
 linux-headers-4.15.0-54-generic : Depends: linux-headers-4.15.0-54 but it is not going to be installed
 linux-image-4.15.0-54-generic : Depends: linux-modules-4.15.0-54-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
 

 


Best Answer by sonja 6 months ago

Just run apt-get -f install (just that with no other arguments)

Should fix all the broken pacakages

George 6 months ago
1 like

try

sudo apt-get upgrade
or sudo apt-get upgrade --fix-missing


mamdouh 6 months ago

No, that still gives the same error
The following packages have unmet dependencies:
 certbot : Depends: python3-certbot (= 0.31.0-1+ubuntu16.04.1+certbot+1) but 0.22.2-1+ubuntu16.04.1+certbot+1 is to be installed
 linux-headers-4.15.0-54-generic : Depends: linux-headers-4.15.0-54 but it is not going to be installed
 linux-image-4.15.0-54-generic : Depends: linux-modules-4.15.0-54-generic but it is not going to be installed


E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

mamdouh 6 months ago
Thanks Sonja.. that did the trick..