0

I upgraded to Ubuntu 20.04 via do-release-upgrade -d. From the terminal everything looked fine. However, when I reboot my desktop again, I found that it's a broken upgrade, icons are lost, some apps like nautilus can't launch, etc.

I ran apt update and it shows 357 packages can be upgraded. but when I did apt upgrade -y

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  gir1.2-appindicator3-0.1 libice6:i386 libsm6:i386 libxt6:i386 python-notify
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
  appstream blender blender-data colord compizconfig-settings-manager cpp-7
  cups cups-bsd cups-client cups-core-drivers cups-daemon cups-filters
  cups-filters-core-drivers cups-ipp-utils cups-ppdc dash deja-dup dpkg
  evolution-data-server fcitx-frontend-qt5 fcitx-modules fontforge
  fontforge-common fwupd fwupd-signed fwupdate gcc-7 gcc-7-base gcc-7-multilib
  gcc-8-base gcc-8-base:i386 gdal-data ghostscript ghostscript-x
  gir1.2-freedesktop gir1.2-glib-2.0 gir1.2-gnomedesktop-3.0
  gir1.2-gst-plugins-base-1.0 gir1.2-gtk-3.0 gir1.2-ibus-1.0 gir1.2-pango-1.0
  gir1.2-polkit-1.0 gir1.2-rb-3.0 gir1.2-soup-2.4 gjs glib-networking
  glib-networking-services gnome-calendar gnome-control-center
  gnome-control-center-data gnome-initial-setup gnome-power-manager
  gnome-session-bin gnome-session-common gnome-settings-daemon gnome-shell
  gnome-shell-common gnome-shell-extension-appindicator
  gnome-shell-extension-ubuntu-dock gnome-software gnome-software-common
  gnome-software-plugin-snap gnome-startup-applications gnome-tweaks
  gnuplot-data gnuplot-qt gparted gsettings-desktop-schemas gstreamer1.0-alsa
  gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-libav
  gstreamer1.0-plugins-base gstreamer1.0-plugins-base:i386
  gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio
  gstreamer1.0-vaapi gstreamer1.0-x gtk-update-icon-cache gvfs gvfs-backends
  gvfs-bin gvfs-common gvfs-daemons gvfs-fuse gvfs-libs hplip hplip-data ibus
  ibus-gtk ibus-gtk3 lib32asan4 lib32cilkrts5 lib32gcc-7-dev lib32mpx2
  lib32ubsan0 libalgorithm-diff-xs-perl libappstream-glib8 libappstream4
  libapt-pkg-perl libasan4 libcairo-gobject-perl libcairo-perl libcilkrts5
  libclone-perl libcups2 libcups2:i386 libcupsimage2 libdazzle-1.0-0
  libebackend-1.2-10 libegl-mesa0 libfcgi-perl libfcitx-qt5-1
  libfile-fcntllock-perl libgail-3-0 libgail-common libgail-common:i386
  libgail18 libgail18:i386 libgbm1 libgcab-1.0-0 libgcc-7-dev libgcc1
  libgcc1:i386 libgfortran4 libgirepository-1.0-1 libgjs0g libgl1-mesa-dri
  libgl1-mesa-dri:i386 libglapi-mesa libglapi-mesa:i386
  libglib-object-introspection-perl libglib-perl libglib2.0-0
  libglib2.0-0:i386 libglib2.0-bin libglib2.0-dev libglib2.0-dev-bin
  libglibmm-2.4-1v5 libglx-mesa0 libglx-mesa0:i386 libgs9 libgs9-common
  libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0
  libgstreamer-plugins-base1.0-0:i386 libgstreamer-plugins-good1.0-0
  libgtk-3-0 libgtk-3-bin libgtk2.0-0 libgtk2.0-0:i386 libgtk2.0-bin
  libgtkmm-2.4-1v5 libgtkmm-3.0-1v5 libhpmud0 libhtml-parser-perl
  libhttp-date-perl libhttp-message-perl libibus-1.0-5 libio-pty-perl
  libio-socket-ssl-perl libjavascriptcoregtk-4.0-18 liblist-moreutils-perl
  liblocale-gettext-perl libmpx2 libnautilus-extension1a libnet-dbus-perl
  libnet-dns-perl libnet-libidn-perl libnet-ssleay-perl libosmesa6
  libosmesa6:i386 libpango-1.0-0 libpango-1.0-0:i386 libpangocairo-1.0-0
  libpangocairo-1.0-0:i386 libpangoft2-1.0-0 libpangoft2-1.0-0:i386
  libpangomm-1.4-1v5 libpangoxft-1.0-0 libperlio-gzip-perl
  libplexus-utils2-java libpolkit-agent-1-0 libpolkit-gobject-1-0
  libpython-all-dev libpython3-dev libpython3-stdlib libqt5concurrent5
  libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5
  libqt5opengl5-dev libqt5printsupport5 libqt5qml5 libqt5quick5
  libqt5quickcontrols2-5 libqt5quicktemplates2-5 libqt5sql5 libqt5sql5-sqlite
  libqt5svg5 libqt5test5 libqt5widgets5 libqt5x11extras5 libqt5xml5
  libreoffice-avmedia-backend-gstreamer libreoffice-base-core
  libreoffice-common libreoffice-core libreoffice-gnome libreoffice-gtk3
  libreoffice-l10n-en-za libreoffice-l10n-zh-cn libreoffice-math
  libreoffice-style-breeze libreoffice-style-galaxy libreoffice-style-tango
  librhythmbox-core10 libsane-common libsane-hpaio libsane1 libsane1:i386
  libsmbclient libsocket6-perl libsoup-gnome2.4-1 libsoup2.4-1 libstdc++-7-dev
  libsub-name-perl libtdb1 libtdb1:i386 libtext-charwidth-perl
  libtext-iconv-perl libubsan0 libvlc-bin libvlc5 libwbclient0
  libwebkit2gtk-4.0-37 libwine libwine:i386 libwww-perl libx32asan4
  libx32cilkrts5 libx32gcc-7-dev libx32ubsan0 libxml-libxml-perl
  libxml-parser-perl libyaml-libyaml-perl lintian lm-sensors mutter nautilus
  nautilus-data octave octave-common orca pavucontrol pdfshuffler perl
  perl-base playonlinux policykit-1 printer-driver-brlaser
  printer-driver-gutenprint printer-driver-hpcups printer-driver-postscript-hp
  python-all python-all-dev python-asn1crypto python-cairo python-cffi-backend
  python-crypto python-cryptography python-dbus python-enum34 python-gobject-2
  python-idna python-ipaddress python-keyring python-pip-whl
  python-pkg-resources python-pypdf2 python-setuptools python-six python-tk
  python-wxgtk3.0 python-wxversion python-xdg python3 python3-apt
  python3-brlapi python3-cairo python3-cffi-backend python3-crypto
  python3-cups python3-dbus python3-dev python3-distutils python3-evdev
  python3-gdbm python3-gi python3-gi-cairo python3-lib2to3 python3-markupsafe
  python3-minimal python3-netifaces python3-pil python3-pip python3-protobuf
  python3-renderpm python3-reportlab python3-reportlab-accel
  python3-setproctitle python3-simplejson python3-systemd python3-uno
  python3-venv python3-yaml python3-zope.interface qml-module-qt-labs-settings
  qml-module-qtgraphicaleffects qml-module-qtquick-controls2
  qml-module-qtquick-layouts qml-module-qtquick-templates2
  qml-module-qtquick-window2 qml-module-qtquick2 qt5-gtk-platformtheme
  qt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools rhythmbox
  rhythmbox-plugins samba-common samba-common-bin samba-libs sane-utils
  texinfo ubuntu-session ubuntu-software unattended-upgrades ure vlc vlc-bin
  vlc-data vlc-plugin-base vlc-plugin-qt vlc-plugin-skins2
  vlc-plugin-video-output winbind wine-stable wine32:i386 wine64 winetricks
  xdg-desktop-portal xdg-desktop-portal-gtk
0 upgraded, 0 newly installed, 0 to remove and 357 not upgraded.

Basically, the system didn't allow me to upgrade. When I tried to install some of these manually, the most common problem it returns is

The following packages have unmet dependencies:
 gsettings-desktop-schemas : Breaks: mutter (< 3.31.4) but 3.28.4-0ubuntu18.04.2 is to be installed
 libreoffice-common : Breaks: libreoffice-core (< 1:6.4.2~rc1) but 1:6.0.7-0ubuntu0.18.04.10 is to be installed
                      Recommends: python3-uno (>= 4.4.0~beta2) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

So it's defi something wrong with the dependencies, but I yet don't know how to fix.

Here is my update log where errors are found

$ cat /var/log/dist-upgrade/apt.log|grep error
  MarkInstall libgpg-error0:amd64 < 1.27-6 -> 1.37-1 @ii umU IPb > FU=0
  new important dependency: libgpg-error-l10n:amd64
  Installing libgpg-error-l10n as Recommends of libgpg-error0
    MarkInstall libgpg-error-l10n:amd64 < none -> 1.37-1 @un uN > FU=0
Negrito
  • 794
  • 1
  • 11
  • 25
  • 1
    Are you sure you used do-release-upgrade -d ? The -d option moves you to the development release, and it's been a long time since 20.04 was in development status (-d currently points to 21.04/hirsute). Something feels wrong with the start of your question & -d & thus I'd check your sources for starters (-d implies a very out-of-date system & mirrors to me) – guiverc Jan 04 '21 at 23:23
  • Yes, I used with -d, I suppose is because that I configure my upgrade only for LTS. – Negrito Jan 04 '21 at 23:26
  • The -d was required before 20.04.1 was released (when the upgrade cycle is enabled), that was some time ago (https://fridge.ubuntu.com/2020/08/06/ubuntu-20-04-1-lts-released/) If you man do-release-upgrade you'll note it doesn't move you to the stable release but development (ie. allows upgrade before official release, and not what you say you're trying to do) – guiverc Jan 04 '21 at 23:28
  • OK then, I learned from the internet, I am not that skilled, so I should I solve the dependency problem? – Negrito Jan 04 '21 at 23:31
  • How about giving us the output of apt-mark showhold? Any held packages? Say docker-ce because you dislike your containers being restarted by a package upgrade? Also, did you verify that the URLs to the repos (the sources.list stanzas) had been adjusted by your run so far and that no third-party sources are active at the time of upgrade? – 0xC0000022L Jan 04 '21 at 23:41
  • 1
    I would suggest you don't use -y on commands unless you're fully sure there will be no errors or issues (ie. know the outcome). I'd also make sure your sources are correct (ie. check sudo apt update with no missing lines; no inappropriate sources), ensure you've fully upgraded sudo apt full-upgrade). A number of warnings signs show, which makes me uneasy to advise as detail is likely missing from what you've provided (evidenced by mistakes; -d -y when inappropriate) – guiverc Jan 04 '21 at 23:41
  • My sources are correct since I've been using them for quite a long time, I would try apt full-upgrade since I think there is no other option around. – Negrito Jan 04 '21 at 23:47
  • 1
    @0xC0000022L apt-mark showhold didn't return anything. – Negrito Jan 04 '21 at 23:50
  • 1
    quite a long time - so if using a mirror, you checked the mirror is still up-to-date and it's counter hasn't dropped to unknown as its update counter overflowed? okay – guiverc Jan 04 '21 at 23:51
  • @guiverc Using apt full-upgrade solved my problem, now things look normal. Very much appreciated! – Negrito Jan 04 '21 at 23:59
  • 2
    FYI: There are differences between upgrade & full-upgrade (just like upgrade & dist-upgrade). Upgrade allows upgrades within certain restrictions, but some (a minority) upgrades are left for when the user wants to apply them (is more willing to be forced to reboot, restart services etc, thus giving the user more control over their system). read man pages for detail info – guiverc Jan 05 '21 at 00:19
  • Thanks for all the tips! Acquired! – Negrito Jan 05 '21 at 00:25
  • 1
    @Negrito I think it'd still be appropriate to write your final solution up as an answer. It's perfectly fine to write an answer to your own question, even if you received assistance. It may even get you some reputation points. – 0xC0000022L Jan 05 '21 at 00:26
  • 2
  • No, mine is related to the apt full-upgrade – Negrito Jan 05 '21 at 06:15

2 Answers2

2

This is solved by using apt full-upgrade suggested by @guiverc. As man apt describes:

upgrade is used to install available upgrades of all packages currently installed on the system from the, but existing packages will never be removed. If an upgrade for a package requires the remove of an installed package the upgrade for this package isn't performed.

Also, make sure the check if your repo (/etc/apt/source.list) is up-to-date.

N0rbert
  • 99,918
Negrito
  • 794
  • 1
  • 11
  • 25
-1

This may often happen when you have installed 3rd party debs. If you can identify the package and remove it you may solve the problem.

I have run into this in the past and can usually circumvent the problem by using the "apt-get dist-upgrade" option. When doing this please remember to run "apt-get autoremove" afterward to get rid of orphaned software.

To avoid the likeliness of such problems in the future please consider using "snaps" or "flatpacks" for any software that is not included in the ubuntu/debian repository.

SLS
  • 168
  • 12