5

I'm trying to upgrade my system from 18.04 to 20.04 using update-manager. No matter what I seem to try, I get an error while calculating the upgrade:

Could not calculate the upgrade 

An unresolvable problem occurred while calculating the upgrade.

At first, the error gave me a reason: I had to purge all Launchpad PPAs. I did that, and after still receiving the same error, I did some searching and found this bug report where some users said installing clang-9 solved this issue. I did so myself, and now I get the same error with a different explanation: I've "installed a prerelease version. This is a transient issue." So I removed clang-9, updated and autoremoved everything, and now I just get the error without any suggested explanation at all.

Since this dialogue isn't helping, I trekked on over to my /var/log/dist-upgrade/main.log, where I saw this line:

ERROR Dist-upgrade failed: 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'

I then checked apt.log to see what was going on. There is clearly quite a bit going wrong.

What are my options from here? If you grep this log for "Broken," there are quite a few packages that the upgrader views as broken (though none of them show up with dpkg or in Synaptic), and removing all of them is unfeasible and I worry may break my whole system. Based on the list of problem packages, I'm thinking there exists a key package or two that fixing will eliminate the whole issue. I am just not sure which ones they might be. Any help would be greatly appreciated.

5

The python-dev package is blocking the intended upgrade from 18.04 to 20.04. This package has been discontinued in 20.04 because Python 2.x is no longer being maintained. Open the terminal and type:

sudo apt remove python-dev python-is-python2 
sudo apt autoremove  

gnuradio-dev depends on python-dev, so run the following command to uninstall it.

sudo apt remove gnuradio-dev

After you have removed python-dev and gnuradio-dev you may be able to upgrade from 18.04 to 20.04 with do-release-upgrade -d without getting an E:Error, pkgProblemResolver::Resolve generated breaks error message. If not see the answers to E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

If that doesn't work do as follows:

sudo apt install ppa-purge aptitude
cat /etc/apt/sources.list

Run sudo ppa-purge ppa-name to uninstall all the packages from the PPAs in your software sources. Then run sudo apt update and try to upgrade from 18.04 to 20.04 with do-release-upgrade -d.

If you try to release upgrade from the terminal and fail, you will get an error message pointing to the location of the log file where the information about which package caused the error message is stored. If not too many other packages depend on whatever package is blocking the release upgrade, you can safely uninstall it and reinstall it after the release upgrade is finished.

11
  • Thanks. Removing those two packages worked. – Jakester897 Oct 6 '20 at 18:53
  • 1
    For me sudo apt remove python-dev did suffice. I would however recommend to do an sudo apt autoremove afterwards to clean up unneeded packages. – Robert Oct 18 '20 at 18:16
  • @Robert That's a good suggestion. – karel Oct 18 '20 at 18:24
  • I've the same problem but it's hard to understand what is the package affecting the error. main.log says something related with python but all python2 stuffs already removed continuing to list python removed packages :( – Luigi Pirelli Nov 17 '20 at 15:00
  • @LuigiPirelli If you at least try to release upgrade from the terminal and fail, you will get an error message pointing to the location of the log file where the information about which package caused the error message is stored. If not too many other packages depend on whatever package is blocking the release upgrade, you can safely uninstall it and reinstall it after the release upgrade is finished. – karel Nov 17 '20 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.