PDA

View Full Version : 16.04: "Not all upgrades can be installed", related to Ubuntu Desktop



nick210
June 26th, 2018, 10:28 AM
Hi,

In the past week or so I've been having problems with updates on my laptop running 16.04 LTS. Typically, when I run the graphical update manager it uses up a lot of memory and reports "Not all upgrades can be installed"; it seems to particularly have a problem with ubuntu-desktop.

Command line updates seem to want to remove ubuntu-desktop and a load of X packages.

Here is a typical sequence of events, what I tried this morning, but similar things have happened on previous days.

Firstly I tried the apt update; apt upgrade - didn't want to install any updates, but maybe none were available.

Next I tried apt update; dist-upgrade, and it wanted to remove ubuntu-desktop and all the X packages (the same as on previous occasions in the past week) - so I aborted.



I didn't do any unusual system modifications that might have caused this.

I then went through a repeated series of attempted upgrades and reboots as follows.



As an alternative I tried running the partial upgrade offered by the graphical update manager but - even though it didn't say it was going to remove it - once I started the partial upgrade, it reported once again that it wanted to remove several X-related packages and ubuntu-desktop.

At the end of this it offered to remove obsolete packages including things such as the Ubuntu system image updater - I said "No" to this as a precaution.



_However_ on reboot, it booted back into X again so it appeared that not all X packages were removed, despite the upgrade reporting that it was going to remove ubuntu-desktop and various X packages.



Next I have tried running the graphical update manager again. The same problem persists - it uses a lot of memory and then comes back with the 'not all updates can be installed' again.
I once again allowed it to do the partial upgrade and this time it only wanted to remove two packages and not update anything.


I let it remove the two packages and then it prompted me to remove 69 obsolete packages, including, for example, gnome-icon-theme, a load of Qt 5 packages, system-image-common, system-image-dbus, ubuntu-keyboard-data, and xserver-xorg-legacy, as well as an old kernel (4.13; it's now on 4.15). I let it remove these 69 packages as it didn't seem to want to remove ubuntu-desktop or X anymore.


Then I let it reboot again. It successfully rebooted back into X and the Ubuntu desktop.


Next I tried a third update using the graphical update manager. Still the problem of using a lot of memory and "Not all updates can be installed". Tried partial upgrade again. It offered to install 61 packages including most of the ones that it removed on the second update! .. basically everything it removed apart from the old kernel packages. I let it install the 61 packages.


After installing the 61 it now reports they're obsolete and is offering to remove them again! This time I selected "Keep".



Reboot again (third reboot), and then I ran the graphical updater for a fourth time. Same result as before ("Not all updates can be installed"). Selected Partial Upgrade and this time just offers to remove 2 packages, gnome-online-accounts and libgoa-backend-1.0.1 (these were the same two as the 2nd run of the updater). Let it remove these two. Then reports that 59 packages are obsolete (i.e. the same 61 minus these two).


Lastly I tried the apt-get update; apt-get dist-upgrade again. Still wanting to remove X stuff, specifically:
gstreamer1.0-clustter-3.0 indicator-bluetooth libcheese-gtk25 libcheese8 libclutter libclutter-gst libclutter-gtk libcogol-pango20 libcogl-path20 libcogl20 ubuntu-desktop unity-control-center xorg xserver-xorg-(various things)



Any ideas on how to resolve this? Or is there any way I can diagnose this (e.g. by looking at config files) to find out what is wrong?

Thanks,
Nick

TheFu
June 26th, 2018, 03:10 PM
tl;dr

ubuntu-desktop is a "meta-package" that includes lots and lots of other packages. If any 1, a single 1, of them is out of support and unused, it needs to be removed (that specific package). That breaks the "meta-package", so it is removed. Nothing more.

The GUI updates shouldn't do anything different than the CLI updates. They both hit the same backend DB and they both honor the same dependencies.

If you want to understand the difference between upgrade and dist-upgrade, the apt-get manpage explains it better than anywhere else I've seen. If you aren't a business, you should probably just always run dist-upgrade (or the proper name, full-upgrade) every time you patch. This will upgrade and remove deprecated packages, which is almost always a good thing.

If you patch weekly, the updates are usually small. If you wait a month or more between patching, more and more dependencies get involved and the total changes become larger.

Plus, having solid, versioned, backups is really the only way to avoid long downtime and it is mandatory for security these days.

nick210
June 26th, 2018, 06:31 PM
OK, sorry - maybe went into a bit too much detail in my original post.

Long and short of it is - I'm getting some kind of update problem. in that apt-get dist-upgrade removes a load of packages, including various X packages (and ubuntu-desktop).

I reboot, and (fairly obviously) X is gone.

So I re-install ubuntu-desktop again, and it pulls in all its component packages.

But then, dist-upgrade makes the same thing happen again, etc etc etc - i.e. it seems to be stuck in an infinite loop of removing packages and re-installing again, only for the packages to be reported as obsolete and dist-upgrade wanting to remove them again.

Would be great if I could get some pointers on what might have gone wrong here, and how I can fix it. Have not done anything unusual with the system so no obvious cause.
Thanks.

deadflowr
June 26th, 2018, 07:01 PM
What 3rd party repositories (or PPAs) are enabled? (Include whether or not you have the -proposed repository enabled as well.)
I've not seen this issue, so what you have (or not have) enabled source-wise can be a base starting point.

nick210
June 27th, 2018, 04:37 PM
OK. Here are all the repositories in my sources list.

gb.archive.ubuntu.com/ubuntu (in all cases) and:

xenial main restricted
xenial universe
xenial-updates universe
xenial multiverse
xenial-updates multiverse
xenial-backports main restricted universe multiverse
xenial-security main restricted
xenial-security universe
xenial-security multiverse

and

[arch=amd64] repo.entroware.com/ubuntu xenial main (entroware is the vendor of my laptop)

Not sure if it's relevant, but these packages are kept back:

libegl1-mesa libgm1 libwayland-egl1-mesa

Is this anything to do with what apt-get dist-upgrade does, i.e. handling changing dependencies? Wonder if some dependency broke at some point.

Is it safe to do just plain upgrade, as opposed to dist-upgrade? Plain apt-get upgrade works fine.

Thanks,
Nick

Dennis N
June 27th, 2018, 05:04 PM
Is it safe to do just plain upgrade, as opposed to dist-upgrade? Plain apt-get upgrade works fine.

Absolutely. That's what I normally do (sudo apt-get update followed by sudo apt-get upgrade) and never had a problem with using that for my normal updating.

P.S. I let the graphical software updater handle any upgrade to another release. Just did another one of those this morning Ubuntu 17.10 to Ubuntu 18.04 without a hitch.

deadflowr
June 27th, 2018, 05:31 PM
Not sure if it's relevant, but these packages are kept back:

libegl1-mesa libgm1 libwayland-egl1-mesa
Ah, definitely relevant.
Let's see what the versions are as well as some other things

dpkg -l | egrep "(mesa|libgdm|libgm1)" | awk '{print $1,$2,$3}'
uname -a

Not sure what libgm1 is suppose to be though.
I see libgbm1 but no libgm1.
Which is what you find when you search for libgm1; threads, mailing lists bug reports which all show output for only libgbm1, even if the title says libgm1.
I included that anyway in the dpkg command, so if anything relates to that package name it'll also show.

(The uname -a is to verify what kernel is in use as well, to help clarify that end in case)

TheFu
June 27th, 2018, 06:24 PM
Might be worth asking entroware. I found a forum post where someone ran into a dependency issue and got help from them.

rsteinmetz70112
June 27th, 2018, 09:23 PM
You don't say (or I missed it) if you've run

dpkg --configure -a
apt --fix-broken install

nick210
June 29th, 2018, 06:15 PM
TheFu: Thanks. Have done, at the moment they are suggesting a package conflict - hopefully my reply to #7 will shed more light on this.
rsteinmetz70112: will give that a go.

nick210
June 29th, 2018, 06:18 PM
OK thanks. Apologies for the late reply - busy couple of days.

Yes it is indeed libgbm not libgm, that was just a typo.

libegl-mesa - amd64 17.2.8-0ubuntu0~16.04.1
libgbm1 - amd64 17.2.8-0ubuntu0~16.04.1
libwayland-egl1-mesa - amd64 17.2.8-0ubuntu0~16.04.1

and the kernel

4.15.0.24-generic #26~16.04.1-Ubuntu SMP Fri Jun 15 14:35:08 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Thanks.

TheFu
June 29th, 2018, 06:31 PM
Yes it is indeed libgbm not libgm, that was just a typo.
.

typo? Aren't you select/pasting this stuff or redirecting output into a file to be moved to another system and copy/pasted? Typing stuff sucks.

Dependency issues can be difficult. The first step is to remove manually installed .deb packages and the 2nd step is to remove any non-core repositories. Then do a full update/upgrade and reboot cycle, if there aren't any errors.

deadflowr
June 29th, 2018, 06:31 PM
It seems to be missing the depends, at least for libegl1-mesa
(I'm not seeing libegl1-mesa-dri which is required for libegl1-mesa)
If you try reinstalling all 3 packages from the output what shows.

(You can use the simulate flag to see what would be installed like this

sudo apt install --reinstall libegl1-mesa libgbm1 libwayland-egl1-mesa -s
the -s option at the end will run as it would but makes it so nothing actually happens and will allow you to see what would happen if you did run the command.)

Post back what it shows.


Typing stuff sucks.
Preaching to the choir

nick210
July 8th, 2018, 11:33 AM
It seems to be missing the depends, at least for libegl1-mesa
(I'm not seeing libegl1-mesa-dri which is required for libegl1-mesa)
If you try reinstalling all 3 packages from the output what shows.

(You can use the simulate flag to see what would be installed like this

sudo apt install --reinstall libegl1-mesa libgbm1 libwayland-egl1-mesa -s
the -s option at the end will run as it would but makes it so nothing actually happens and will allow you to see what would happen if you did run the command.)

Post back what it shows.


Hi,

Many thanks for this! The reinstall appears to have completely solved the problem - both command line apt and the graphical installer now install software without showing any 'kept back' warnings or other strange behaviour.

It did pull in a missing dependency i.e. libgl1-mesa-dri.

Apologies for the late reply - I've had quite a few things I've needed to deal with this week.

Just one last question, any idea as to why the error occurred in the first place?

Many thanks once again.

TheFu
July 8th, 2018, 01:46 PM
Just one last question, any idea as to why the error occurred in the first place?

The most likely is disk/cable/controller errors but a few uncaught errors in APT can lead to DB corruption. If the OS hasn't been refreshed or the disk doesn't get to see all the bits every few months (like doing backups would cause), then the bits get lazy and the disk hardware doesn't get a chance to read, refresh and possibly relocate failing disk sectors BEFORE it is a problem. SMART would provide some ideas if it is the disk or the cable beginning to fail. Use smartctl to see that data. SMART data is far from perfect. A little over 20% of the time, it doesn't show any issues before a disk fails completely.

Doing backups is also preventative.

Or it could be almost anything else.

The best chance is to have versioned backups, monitor logfiles, and correct tiny issues when they begin, before multiple problems convolute any issues.

IMHO.