Unable to upgrade to 18.04 from 17.10: An unresolvable problem occurred while calculating the upgrade

I heard that waiting a few weeks after a new Ubuntu release is usually a good idea, and so I've only just gotten around to trying to install the update. Turns out that when I try and install the update with sudo do-release-upgrade on my laptop, I get this:

Calculating the changes

Calculating the changes

Could not determine the upgrade 

An unresolvable problem occurred while calculating the upgrade. 

This can be caused by: 
* Upgrading to a pre-release version of Ubuntu 
* Running the current pre-release version of Ubuntu 
* Unofficial software packages not provided by Ubuntu 

If none of this applies, then please report this bug using the 
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. 


Restoring original system state

Aborting
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

I thought this was mighty strange, so I did some searching, and people suggested I run grep Broken /var/log/dist-upgrade/apt.log to find out what went wrong. Upon running it though, I discovered that my problem appears to be non-trivial. Here's my output from that:

Broken curl:amd64 Depends on libcurl4:amd64 < none | 7.58.0-2ubuntu3.1 @un uH > (= 7.58.0-2ubuntu3.1)
Broken libopencv-imgcodecs3.1:amd64 Depends on gdal-abi-2-2-1:amd64 < none @un H >
Broken librubberband2:amd64 Conflicts on librubberband2v5:amd64 < 1.8.1-6ubuntu2 @ii mK Ib >
Broken libsmbios-c2:amd64 Conflicts on libsmbios2v5:amd64 < 2.3.1-0ubuntu2 @ii mK Ib >
Broken libopencv-videoio3.1:amd64 Depends on libopencv-imgcodecs3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR > (= 3.1.0+dfsg1-1~exp1ubuntu3)
Broken libopencv-highgui3.1:amd64 Depends on libopencv-videoio3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR > (= 3.1.0+dfsg1-1~exp1ubuntu3)
Broken libubuntu-app-launch4:amd64 Depends on libcurl4:amd64 < none | 7.58.0-2ubuntu3.1 @un uH > (>= 7.16.2)
Broken gnupg1:amd64 Conflicts on gnupg1-curl:amd64 < 1.4.22-1ubuntu1 @ii mK >
Broken gir1.2-spiceclientglib-2.0:amd64 Breaks on gir1.2-spice-client-glib-2.0:amd64 < 0.33-3.3 @ii mK > (< 0.34)
Broken gir1.2-totemplparser-1.0:amd64 Conflicts on gir1.2-totem-plparser-1.0:amd64 < 3.10.8-3ubuntu1 @ii mK >
Broken libdbusmenu-qt5-2:amd64 Breaks on libdbusmenu-qt5:amd64 < 0.9.3+16.04.20160218-0ubuntu1 @ii mK >
Broken gir1.2-ggit-1.0:amd64 Conflicts on gir1.2-git2-glib-1.0:amd64 < 0.24.4-1 @ii mK >
Broken libglib2.0-dev:amd64 Depends on libpcre3-dev:amd64 < none | 2:8.39-9 @un uH > (>= 1:8.31)
Broken libcurl4-openssl-dev:amd64 Depends on libcurl4:amd64 < none | 7.58.0-2ubuntu3.1 @un uH > (= 7.58.0-2ubuntu3.1)
Broken gir1.2-spiceclientgtk-3.0:amd64 Breaks on gir1.2-spice-client-gtk-3.0:amd64 < 0.33-3.3 @ii mK Ib > (< 0.34)
Broken libharfbuzz-dev:amd64 Depends on libglib2.0-dev:amd64 < none | 2.56.1-2ubuntu1 @un uH > (>= 2.19.1)
Broken libopencv-objdetect3.1:amd64 Depends on libopencv-highgui3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR > (= 3.1.0+dfsg1-1~exp1ubuntu3)
Broken libopencv-videostab3.1:amd64 Depends on libopencv-videoio3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR >
Broken libopencv-stitching3.1:amd64 Depends on libopencv-objdetect3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR > (= 3.1.0+dfsg1-1~exp1ubuntu3)
Broken libopencv-superres3.1:amd64 Depends on libopencv-videoio3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR > (= 3.1.0+dfsg1-1~exp1ubuntu3)
Broken libopenimageio1.6:amd64 Depends on libopencv-videoio3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR >
Broken libopencv-contrib3.1:amd64 Depends on libopencv-highgui3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR > (= 3.1.0+dfsg1-1~exp1ubuntu3)
Broken libopencv-features2d3.1:amd64 Depends on libopencv-highgui3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR > (= 3.1.0+dfsg1-1~exp1ubuntu3)
Broken url-dispatcher:amd64 Depends on libubuntu-app-launch4:amd64 < 0.12+17.04.20170404.2-0ubuntu4 | 0.12+17.04.20170404.2-0ubuntu6 @ii ugR > (>= 0.10)
Broken libicu-le-hb-dev:amd64 Depends on libharfbuzz-dev:amd64 < none | 1.7.2-1ubuntu1 @un uH >
Broken url-dispatcher-tools:amd64 Depends on url-dispatcher:amd64 < 0.1+17.04.20170328-0ubuntu3 | 0.1+17.04.20170328-0ubuntu4 @ii ugR > (= 0.1+17.04.20170328-0ubuntu4)
Broken libopencv-calib3d3.1:amd64 Depends on libopencv-features2d3.1:amd64 < 3.1.0+dfsg1-1~exp1ubuntu3 @ii mR > (= 3.1.0+dfsg1-1~exp1ubuntu3)
Broken unity-greeter-session-broadcast:amd64 Depends on url-dispatcher-tools:amd64 < 0.1+17.04.20170328-0ubuntu3 | 0.1+17.04.20170328-0ubuntu4 @ii ugR >
Broken libicu-dev:amd64 Depends on libicu-le-hb-dev:amd64 < none | 1.0.3+git161113-4 @un uH >
Broken icu-devtools:amd64 Breaks on libicu-dev:amd64 < 57.1-6ubuntu0.3 | 60.2-3ubuntu3 @ii umH > (< 60.2-3ubuntu3)
Broken libicu-dev:amd64 Depends on libicu-le-hb-dev:amd64 < none | 1.0.3+git161113-4 @un uH >
Broken icu-devtools:amd64 Breaks on libicu-dev:amd64 < 57.1-6ubuntu0.3 | 60.2-3ubuntu3 @ii umH > (< 60.2-3ubuntu3)
Broken libicu-dev:amd64 Depends on libicu-le-hb-dev:amd64 < none | 1.0.3+git161113-4 @un uH >
Broken icu-devtools:amd64 Breaks on libicu-dev:amd64 < 57.1-6ubuntu0.3 | 60.2-3ubuntu3 @ii umH > (< 60.2-3ubuntu3)
Broken libicu-dev:amd64 Depends on libicu-le-hb-dev:amd64 < none | 1.0.3+git161113-4 @un uH >
Broken icu-devtools:amd64 Breaks on libicu-dev:amd64 < 57.1-6ubuntu0.3 | 60.2-3ubuntu3 @ii umH > (< 60.2-3ubuntu3)
Broken libicu-dev:amd64 Depends on libicu-le-hb-dev:amd64 < none | 1.0.3+git161113-4 @un uH >
Broken icu-devtools:amd64 Breaks on libicu-dev:amd64 < 57.1-6ubuntu0.3 | 60.2-3ubuntu3 @ii umH > (< 60.2-3ubuntu3)
Broken libicu-dev:amd64 Depends on libicu-le-hb-dev:amd64 < none | 1.0.3+git161113-4 @un uH >
Broken icu-devtools:amd64 Breaks on libicu-dev:amd64 < 57.1-6ubuntu0.3 | 60.2-3ubuntu3 @ii umH > (< 60.2-3ubuntu3)
Broken libicu-dev:amd64 Depends on libicu-le-hb-dev:amd64 < none | 1.0.3+git161113-4 @un uH >
Broken icu-devtools:amd64 Breaks on libicu-dev:amd64 < 57.1-6ubuntu0.3 | 60.2-3ubuntu3 @ii umH > (< 60.2-3ubuntu3)
Broken libicu-dev:amd64 Depends on libicu-le-hb-dev:amd64 < none | 1.0.3+git161113-4 @un uH >

Does anyone know what's going on here and how I can fix it? Reinstalling is not an option at this point - I like my configuration!

I've checked, and none of the similar questions appear to be my problem.

Additional system information:

  • I'm currently on 17.10 (artful aardvark)
  • I want to upgrade to 18.04 (bionic beaver)
  • uname -a: Linux <REDACTED> 4.13.0-43-generic #48-Ubuntu SMP Wed May 16 12:18:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • I'm using the Unity desktop, as I have a serious dislike for the new gnome desktop
  • I've got an Intel i7-7500U, Intel HD Graphics 620 r02, 16GB RAM, and an AND discrete graphics card.
  • Additional information available upon request.

Looks like I've managed to solve my own problem. For those with this issue themselves, here's a few techniques I utilised to solve my problem.

Reading the output of grep Broken /var/log/dist-upgrade/apt.log is only the first step. Next, I used

grep -C5 broken_package_name /var/log/dist-upgrade/apt.log

to show some additional output surrounding a broken package name to get some more information on what went wrong. Combined with apt-cache's rdepends option, you can start to figure out what might be causing the issue:

apt-cache rdepends --installed broken_package_name

Also of note is the additional output at the bottom of /var/log/dist-upgrade/apt.log. For each Broken package, some of them are shown to have been Fixed by the dependency problem resolver. These can generally be ignored - and other more important ones focused on first.

Don't forget to keep running sudo do-release-upgrade every time you change one thing in order to get an updated readout on what's changed.

Once problem packages have been identified, they can either be updated (if they are from a third-party), or temporarily removed (if they're from from a 3rd party PPA) and re-installed later as all 3rd party PPAs are disabled as part of the upgrade process - thereby inadvertently causing issues if there's an updated version of said package in the PPA for the release of Ubuntu you're upgrading to (e.g. in my case it was bionic) as it can't see that to install it. Note that your settings will remain for later unless you remove it with apt purge.


for me it appears to be resulting because 16.04 was so Qt-arded. I had to install a custom libqt5core or very little Qt stuff worked. So, of course, when you remove the core, it guts half your useful stuff. Yay ubuntu official Qt support!

The following packages will be REMOVED:
  account-plugin-aim account-plugin-facebook account-plugin-flickr
  account-plugin-google account-plugin-jabber account-plugin-salut
  account-plugin-twitter account-plugin-yahoo appmenu-qt5 baloo-kf5
  checkbox-converged checkbox-gui checkbox-qt dolphin eric eric-api-files
  gimp-gmic hud k4dirstat kactivities kapptemplate kate kde-baseapps-bin
  kde-runtime kde-style-breeze kde-style-breeze-qt4 kdevelop kinit kio kmag
  kompare kpackagelauncherqml kpackagetool5 kpart5-kompare krdc krfb krusader
  ktexteditor-katepart kubuntu-debug-installer kvpnc kwayland-integration
  libaccount-plugin-1.0-0 libaccount-plugin-generic-oauth
  libaccount-plugin-google libaccounts-qt5-1 libdee-qt5-3 libdolphinvcs5
  libgsettings-qt1 libhud-client2 libkf5activities5 libkf5archive5
  libkf5attica5 libkf5auth5 libkf5baloo5 libkf5balooengine5
  libkf5baloowidgets-bin libkf5baloowidgets5 libkf5bookmarks5
  libkf5calendarevents5 libkf5codecs5 libkf5completion5 libkf5config-bin
  libkf5configcore5 libkf5configgui5 libkf5configwidgets5 libkf5coreaddons5
  libkf5crash5 libkf5dbusaddons-bin libkf5dbusaddons5 libkf5declarative5
  libkf5dnssd5 libkf5filemetadata-bin libkf5filemetadata3
  libkf5globalaccel-bin libkf5globalaccel5 libkf5globalaccelprivate5
  libkf5guiaddons5 libkf5i18n5 libkf5iconthemes-bin libkf5iconthemes5
  libkf5idletime5 libkf5itemmodels5 libkf5itemviews5 libkf5jobwidgets5
  libkf5kcmutils5 libkf5kdelibs4support5 libkf5kdelibs4support5-bin
  libkf5kiocore5 libkf5kiofilewidgets5 libkf5kiontlm5 libkf5kiowidgets5
  libkf5newstuff5 libkf5notifications5 libkf5package5 libkf5parts-plugins
  libkf5parts5 libkf5plasma5 libkf5plasmaquick5 libkf5quickaddons5
  libkf5service-bin libkf5service5 libkf5solid5 libkf5sonnetcore5
  libkf5sonnetui5 libkf5style5 libkf5texteditor5 libkf5textwidgets5
  libkf5threadweaver5 libkf5wallet-bin libkf5wallet5 libkf5waylandclient5
  libkf5widgetsaddons5 libkf5windowsystem5 libkf5xmlgui-bin libkf5xmlgui5
  libkomparediff2-5 libkompareinterface5 libkwalletbackend5-5
  libonline-accounts-client1 liboxideqt-qmlplugin liboxideqtcore0
  liboxideqtquick0 libphonon4qt5-4 libpolkit-qt5-1-1 libpoppler-qt5-1 libqapt3
  libqapt3-runtime libqcustomplot1.3 libqt5clucene5 libqt5core5a libqt5dbus5
  libqt5designer5 libqt5feedback5 libqt5gui5 libqt5help5 libqt5location5
  libqt5multimedia5 libqt5network5 libqt5opengl5 libqt5organizer5
  libqt5positioning5 libqt5printsupport5 libqt5qml-graphicaleffects libqt5qml5
  libqt5quick5 libqt5quicktest5 libqt5quickwidgets5 libqt5scintilla2-12v5
  libqt5script5 libqt5sensors5 libqt5sql5 libqt5sql5-odbc libqt5sql5-sqlite
  libqt5svg5 libqt5test5 libqt5waylandclient5 libqt5webkit5
  libqt5webkit5-qmlwebkitplugin libqt5widgets5 libqt5x11extras5 libqt5xml5
  libsignon-extension1 libsignon-plugins-common1 libsignon-qt5-1 libu1db-qt5-3
  libubuntugestures5 libubuntutoolkit5 libunity-action-qt1 libunity-webapps0
  libunityvoice1 mcp-account-manager-uoa okular plasma-framework pyotherside
  python-pyqt5 python-pyqt5.qtsql python3-multibootusb python3-pyqt5
  python3-pyqt5.qsci python3-pyqt5.qtsql python3-pyqt5.qtwebkit qapt-batch
  qml-module-io-thp-pyotherside qml-module-org-kde-activities
  qml-module-org-kde-kquickcontrols qml-module-org-kde-kquickcontrolsaddons
  qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
  qml-module-qtfeedback qml-module-qtgraphicaleffects
  qml-module-qtquick-controls qml-module-qtquick-dialogs
  qml-module-qtquick-layouts qml-module-qtquick-localstorage
  qml-module-qtquick-privatewidgets qml-module-qtquick-window2
  qml-module-qtquick2 qml-module-qttest qml-module-qtwebkit
  qml-module-ubuntu-components qml-module-ubuntu-layouts
  qml-module-ubuntu-onlineaccounts qml-module-ubuntu-onlineaccounts-client
  qml-module-ubuntu-performancemetrics qml-module-ubuntu-test
  qml-module-ubuntu-ui-extras-browser qml-module-ubuntu-web qmlscene
  qtdeclarative5-accounts-plugin qtdeclarative5-dev-tools
  qtdeclarative5-dialogs-plugin qtdeclarative5-localstorage-plugin
  qtdeclarative5-online-accounts-client0.1
  qtdeclarative5-privatewidgets-plugin qtdeclarative5-qtfeedback-plugin
  qtdeclarative5-qtquick2-plugin qtdeclarative5-test-plugin
  qtdeclarative5-u1db1.0 qtdeclarative5-ubuntu-settings-components
  qtdeclarative5-ubuntu-ui-extras-browser-plugin
  qtdeclarative5-ubuntu-ui-toolkit-plugin qtdeclarative5-ubuntu-web-plugin
  qtdeclarative5-unity-action-plugin qtdeclarative5-window-plugin qtwayland5
  signon-keyring-extension signon-plugin-oauth2 signon-plugin-password
  signon-ui signon-ui-x11 signond smb4k sonnet-plugins sqlitebrowser
  ubuntu-desktop unity-control-center-signon unity-scope-gdrive
  unity-tweak-tool unity-voice-service unity-webapps-common
  unity-webapps-facebookmessenger unity-webapps-qml unity-webapps-service
  virtualbox-qt webapp-container webbrowser-app