I am not sure what caused this error, but here is what the whole error says, and also this is sitting as a notification, and preventing me from updating any software using Update Manager - Please provide some assistance or tell me how to figure out what to do to fix it.
Could not calculate the upgrade
An unresolvable problem occurred while calculating the upgrade.
Please report this bug against the 'update-manager' package and include the following error message:
'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'
This post may solve your issue. To summarise,
/var/log/dist-upgrade/apt.log
log file in a text editor.sudo apt-get remove <package>
.Note: in newer versions, the log is located in
/var/log/apt/term.log
instead.Try:
Then run the update-manager again.
I got this error when doing upgrade from 16.04 to 18.04 and power-lost in the middle.
This is what the error looked like, and apt-get install -f does not fix it.
I also tried
sudo apt-get remove
packages in /var/log/dist-upgrade/apt.log but that didn't work, too.This one worked for me
It removed broken packages then I ran
It downloaded and installed packages.
To me, the problem looked like this
It was caused by a wrong selection of the kind of updates I wanted to download. I fixed it by opening
Software & Updates
, selectingUpdates
, and ensuring I had selectedAll updates
forFor other packages, subscribe to:
. See picture belowI then run the usual
apt update && apt dist-upgrade
, and then I was able to install that lib.I ran into this problem yesterday after someone rebooted during an OS version upgrade. None of the approaches worked above because of the sheer scale of the mess ups (~1500 packages).
To recover I went to
/var/log/apt/history.log
and looked at the last entry which has three very long lists describing what was being attempted when the OS upgrade failed. It consists of three lists "Upgrade:" "Install:" "Remove:" of the form:Take those three lists into your favourite regexp compatible editor, and replace the parentheses up to the comma with a newline. For the "Remove:" section append a "-" so you're left with lists like:
The "-" was a key learning because unless you can tell it to both install and remove you won't be able to work your way past many of the dependency cycles.
Keep a copy of this file so you can refer to it later, but make a new copy where you clean it up: remove all the extra lines of the file leaving just the
package:arch
lines.Run apt using that resulting file packages.txt as follows
This command will be all the adds/removes that the system intended to do before it got broken, and should represent a consistent set.
Assuming it finishes you can then complete anything missed with
sudo apt install -f
andsudo apt dist-upgrade
.Finish by creating a new list with just the "Install:" list of packages, pass them to
apt-mark auto
to mark the packages as automatically installed (the upgrade chose them, not you).I hope that helps someone else out there who thought their whole system was borked.
This error can be caused by an incomplete package installation.
You have two options, 1) fix the broken installation, or 2) roll back (or remove) the broken installation.
Since it was not mentioned above, to roll back and remove the broken installation, exit synaptic (if you are still in it) and then enter these commands into a terminal:
Then to confirm that the broken packages are gone, go back into synaptic and select,
Edit
|Fix broken packages
and there should be no broken packages.Note this does not fix the broken installation, it simply allows you to proceed again in synaptic with some other installation or removal, etc.
What happened was that you started a package installation and then part way through it, and after some dependencies had been installed, something went wrong, leaving unused dependent packages, and an incomplete install.