apt wants to uninstall VLC because libgles1 is too old, even though the VLC team removed the libgles1 dependency [closed]

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

Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) libgles1-mesa [ amd64 ] < 12.0.6-0ubuntu0.16.04.1 > ( libs )
Broken libgles1-mesa:amd64 Depends on libglapi-mesa [ amd64 ] < 12.0.6-0ubuntu0.16.04.1 -> 17.0.7-0ubuntu0.16.04.1 > ( libs ) (= 12.0.6-0ubuntu0.16   .04.1)
    Considering libglapi-mesa:amd64 64 as a solution to libgles1-mesa:amd64 2
    Removing libgles1-mesa:amd64 rather than change libglapi-mesa:amd64
Investigating (0) vlc [ amd64 ] < 2.2.2+git20170721+r59033+56~ubuntu16.04.1 > ( video )
Broken vlc:amd64 Depends on libgles1-mesa [ amd64 ] < 12.0.6-0ubuntu0.16.04.1 > ( libs ) (>= 7.8.1)
    Considering libgles1-mesa:amd64 2 as a solution to vlc:amd64 1
Broken vlc:amd64 Depends on libgles1 [ amd64 ] < none ->  > ( none )
    Considering libgles1-mesa:amd64 2 as a solution to vlc:amd64 1
    Or group remove for vlc:amd64
Done

Searching the web, I found that libgles1 has been deprecated.

The VLC team have updated their dependencies from 2.2.2-5ubuntu0.16.04.2, but my system has apparently not caught up with that (I checked by running apt-cache depends vlc, and it shows a dependency on libgles1-mesa).

Now it happens that a couple of months ago I added the launchpad videolan PPA (to get the latest, least buggy VLC).

That gave me VLC version 2.2.7 and fixed the VLC bug, and is what I have on my system today. I know, because vlc --version tells me so.

apt-cache policy vlc says:

Installed: 2.2.2+git20170721+r59033+56~ubuntu16.04.1
Candidate: 2.2.2+git20170721+r59033+56~ubuntu16.04.1
Version table:
*** 2.2.2+git20170721+r59033+56~ubuntu16.04.1 500
    500 http://ppa.launchpad.net/videolan/stable-daily/ubuntu xenial/main amd64 Packages
    100 /var/lib/dpkg/status
 2.2.2-5ubuntu0.16.04.3 500
    500 http://gb.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
    500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
 2.2.2-5 500
    500 http://gb.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

(It seems weird that apt-cache policy says that 2.2.2+git20170721+r59033+56~ubuntu16.04.1 is installed; I read that as vlc version 2.2.2, which conflicts with the 2.2.7 that vlc --version gives.)

Apparently I have Ubuntu version 16.04.2 LTS 64-bit installed (from System Details in the GUI Control Panel thing).

I suppose that I could disable the launchpad PPA, but in that case I would presumably revert to an older vlc binary which was crashing my system.

So my question is (at least I think this is the right question):
How do I convince apt that it's ok that libgles1-mesa is old or missing?


The solution was to fake a newer version of libgles1 using dpkg-deb. This is safe since that package is redundant on my system.

sudo ppa-purge -o  videolan -p stable-daily -d xenial

Now the newer vlc (2.2.7) is gone, and standard (crashy) vlc is back:

$ vlc --version
VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)

Run sudo apt remove libgles1-mesa, so that Software Updater isn't bunged up any more.

Software Updater now installs libgles2 v17.0.7 plus various other related libs.

sudo add-apt-repository ppa:videolan/stable-daily
sudo apt update

Now apt list --upgradeable shows

libvlc5/xenial 2.2.2+git20170721+r59033+56~ubuntu16.04.1 amd64 [upgradable from: 2.2.2-5ubuntu0.16.04.3]
libvlccore8/xenial 2.2.2+git20170721+r59033+56~ubuntu16.04.1 amd64 [upgradable from: 2.2.2-5ubuntu0.16.04.3]
vlc/xenial 2.2.2+git20170721+r59033+56~ubuntu16.04.1 amd64 [upgradable from: 2.2.2-5ubuntu0.16.04.3]
vlc-data/xenial,xenial 2.2.2+git20170721+r59033+56~ubuntu16.04.1 all [upgradable from: 2.2.2-5ubuntu0.16.04.3]
vlc-nox/xenial 2.2.2+git20170721+r59033+56~ubuntu16.04.1 amd64 [upgradable from: 2.2.2-5ubuntu0.16.04.3]
vlc-plugin-notify/xenial 2.2.2+git20170721+r59033+56~ubuntu16.04.1 amd64 [upgradable from: 2.2.2-5ubuntu0.16.04.3]
vlc-plugin-samba/xenial 2.2.2+git20170721+r59033+56~ubuntu16.04.1 amd64 [upgradable from: 2.2.2-5ubuntu0.16.04.3]

Run Software Updater. It installs 5 of the 7 debs:

Start-Date: 2017-07-28  12:22:38
Commandline: aptdaemon role='role-commit-packages' sender=':1.208'
Upgrade: vlc-plugin-samba:amd64 (2.2.2-5ubuntu0.16.04.3, 2.2.2+git20170721+r59033+56~ubuntu16.04.1), vlc-plugin-notify:amd64    (2.2.2-5ubuntu0.16.04.3, 2.2.2+git20170721+r59033+56~ubuntu16.04.1), libvlc5:amd64 (2.2.2-5ubuntu0.16.04.3, 2.2.2+git201707   21+r59033+56~ubuntu16.04.1), libvlccore8:amd64 (2.2.2-5ubuntu0.16.04.3, 2.2.2+git20170721+r59033+56~ubuntu16.04.1), vlc-data   :amd64 (2.2.2-5ubuntu0.16.04.3, 2.2.2+git20170721+r59033+56~ubuntu16.04.1)
End-Date: 2017-07-28  12:22:42

Now run

sudo apt download libgles1-mesa
sudo dpkg-deb -x ~/libgles1-mesa_12.0.6-0ubuntu0.16.04.1_amd64.deb .
sudo dpkg-deb --control ~/libgles1-mesa_12.0.6-0ubuntu0.16.04.1_amd64.deb .

Modify the DEBIAN/control Depends line to read:

Depends: libglapi-mesa (= 17.0.7-0ubuntu0.16.04.1), libc6 (>= 2.2.5)

(because libglapi was upgraded to 17.0.7)

sudo dpkg-deb -b . ~/libgles1-mesa_17.0.7-0ubuntu0.16.04.1_amd64.deb
sudo dpkg -i libgles1-mesa_17.0.7-0ubuntu0.16.04.1_amd64.deb
sudo apt install vlc-nox
sudo apt install vlc

Now vlc --version outputs

VLC media player 2.2.7 Umbrella (revision 2.2.2+git20170721+r59033+56~ubuntu16.04.1)

Software Updater runs happily. Well I never!