On Ubuntu 18.04
Upgrade gives
The following packages have unmet dependencies: linux-headers-5.3.0-45-generic : Depends: linux-headers-5.3.0-45 but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
--fix broken install gives EOF error
Ok, I had tried to post this earlier, but it did not post and I fixed the problem before it posted. I figured I would still post it and how it was fixed.
Apparently, some files in the apt cache folder were damaged. So I followed theses steps:
Clear the apt cache
Update the list of available software packages
Try to finish all pending installations
Try the upgrade again
Note: I would proceed with the next step only if the previous step had succeeded.