Question

Upgrade Ubuntu 18.04 to 20.04

Posted December 13, 2021 234 views
Ubuntu 18.04

Hi,
when trying to upgrade from ubuntu 18.04 to 20.04, I get the following error
could not calculate the upgrade
an unresolvable problem occurred while calculating the upgrade.

I did look at the main.log and identified an “error” line
ERROR Dist-upgrade failed : ‘E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.’

*BTY I just did the upgrade from 16 to 18 and it went well. The only thing is that the web management is still reporting : (Ubuntu 16.04.3x64)

Any idea?

Best regards

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello,

What I could suggest is to try the following first:

  • Make sure your package list is up to date:
sudo apt update
  • Remove all “no longer required” packages
sudo apt autoremove

If this does not help, I would suggest checking the following log:

/var/log/dist-upgrade/apt.log

In there you should have more information on which packages are stopping the upgrade. You would then need to use the apt remove PACKAGE_NAME_HERE and remove those packages in order to be able to proceed with the upgrade.

As a side note, always make sure to backup your server before proceeding with such major upgrades.

Let me know how it goes.
Regards,
Bobby

  • Hi Bobby,
    Thanks for your quick answer.
    I saw the apt update / autoremove on another post but that unfortunately didn’t fix the issue.

    In the apt.log, I’m not sure what to look for. Can you give me a hint?

    Thank you.
    Mat

  • I ran a grep Broken apt.log command see the results.

    Broken dpkg:amd64 Breaks on libapt-pkg5.0:amd64 < 1.6.14 @ii mK > (< 1.7~b)
    Broken mysql-client-8.0:amd64 Conflicts on mysql-client-5.7:amd64 < 5.7.36-0ubuntu0.18.04.1 @ii mK Ib >
    Broken mysql-client-8.0:amd64 Conflicts on virtual-mysql-client:amd64 < none @un H >
    Broken mysql-client-core-8.0:amd64 Conflicts on mysql-client-core-5.7:amd64 < 5.7.36-0ubuntu0.18.04.1 @ii mK Ib >
    Broken mysql-client-core-8.0:amd64 Conflicts on virtual-mysql-client-core:amd64 < none @un H >
    Broken mysql-server-core-8.0:amd64 Conflicts on mysql-server-5.7:amd64 < 5.7.36-0ubuntu0.18.04.1 @ii mK Ib >
    Broken mysql-server-core-8.0:amd64 Conflicts on mysql-server-core-5.7:amd64 < 5.7.36-0ubuntu0.18.04.1 @ii mK Ib >
    Broken mysql-server-core-8.0:amd64 Conflicts on virtual-mysql-server-core:amd64 < none @un H >
    Broken libsensors-config:amd64 Conflicts on libsensors4:amd64 < 1:3.4.0-4 @ii mK >
    Broken libapt-inst2.0:amd64 Depends on libapt-pkg5.0:amd64 < 1.6.14 @ii mR > (>= 1.1~exp9)
    Broken libpolkit-backend-1-0:amd64 Depends on libpolkit-gobject-1-0:amd64 < 0.105-20ubuntu0.18.04.5 -> 0.105-26ubuntu1.1 @ii umU > (= 0.105-20ubuntu0.18.04.5)
    Broken libsnmp30:amd64 Depends on libsensors4:amd64 < 1:3.4.0-4 @ii mR > (>= 1:3.0.0)
    Broken libsensors-config:amd64 Conflicts on libsensors4:amd64 < 1:3.4.0-4 @ii mK >
    Broken libsnmp30:amd64 Depends on libsensors4:amd64 < 1:3.4.0-4 @ii mR > (>= 1:3.0.0)
    Broken libsensors-config:amd64 Conflicts on libsensors4:amd64 < 1:3.4.0-4 @ii mK >
    Broken libsensors5:amd64 Depends on libsensors-config:amd64 < none | 1:3.6.0-2ubuntu1 @un uH >
    Broken libsnmp35:amd64 Depends on libsensors5:amd64 < none | 1:3.6.0-2ubuntu1 @un uH > (>= 1:3.5.0)
    Broken snmp:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (= 5.8+dfsg-2ubuntu2.3)
    Broken sp-php8.0:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (>= 5.8+dfsg)
    Broken sp-php8.1:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (>= 5.8+dfsg)
    Broken sp-php7.2:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (>= 5.8+dfsg)
    Broken sp-php7.3:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (>= 5.8+dfsg)
    Broken sp-php7.4:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (>= 5.8+dfsg)
    Broken libsnmp-base:amd64 Breaks on snmp:amd64 < 5.7.3+dfsg-1.8ubuntu3.6 | 5.8+dfsg-2ubuntu2.3 @ii umH > (< 5.7.3+dfsg-5)
    Broken snmp:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (= 5.8+dfsg-2ubuntu2.3)
    Broken libsnmp-base:amd64 Breaks on snmp:amd64 < 5.7.3+dfsg-1.8ubuntu3.6 | 5.8+dfsg-2ubuntu2.3 @ii umH > (< 5.7.3+dfsg-5)
    Broken snmp:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (= 5.8+dfsg-2ubuntu2.3)
    Broken libsnmp-base:amd64 Breaks on snmp:amd64 < 5.7.3+dfsg-1.8ubuntu3.6 | 5.8+dfsg-2ubuntu2.3 @ii umH > (< 5.7.3+dfsg-5)
    Broken snmp:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (= 5.8+dfsg-2ubuntu2.3)
    Broken libsnmp-base:amd64 Breaks on snmp:amd64 < 5.7.3+dfsg-1.8ubuntu3.6 | 5.8+dfsg-2ubuntu2.3 @ii umH > (< 5.7.3+dfsg-5)
    Broken snmp:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (= 5.8+dfsg-2ubuntu2.3)
    Broken libsnmp-base:amd64 Breaks on snmp:amd64 < 5.7.3+dfsg-1.8ubuntu3.6 | 5.8+dfsg-2ubuntu2.3 @ii umH > (< 5.7.3+dfsg-5)
    Broken snmp:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2.3 @un uH > (= 5.8+dfsg-2ubuntu2.3)
    

    So I read that I should remove them with

    sudo apt-get remove
    

    But for some of them, I have no idea what they are and if they are useful.
    I also tried to upgrade the mysql with the flowing how to but it failed and now my sites are not accessible anymore.
    I had a snapshot so I just restored it.

    Not sure what to do next.

    by Brian Boucheron
    In this tutorial we will install the MySQL official apt software repository, then install the MySQL software itself, secure the installation, and finally we'll test that MySQL is running and responding to commands.
    • Hi there,

      Indeed it looks like that there are quite a few packages like MySQL and PHP, what you could do is remove them and then once you’ve upgraded your Ubuntu version, then install them again.

      That way the correct version of the packages will be pulled from the Ubuntu 20.04 repository.

      Main thing to keep in mind is that you might is that this could cause some downtime for your application so make sure that you have a backup of the app or the server before proceeding.

      Let me know how it goes.
      Best,
      Bobby