0

Something happened on an upgrade. I am not sure what. The result on further upgrades is listed below. I tried the apt --fix-broken install with no success. I listed that output afterwards.

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libglvnd-dev : Depends: libglvnd0 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed
                Depends: libglvnd-core-dev (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed
                Depends: libegl1 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed
                Depends: libgles2 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed
                Depends: libgl1 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed
                Depends: libglx0 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed
                Depends: libopengl0 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ apt --fix-broken install
Do you want to continue? [Y/n] 
(Reading database ... 469780 files and directories currently installed.)
Preparing to unpack .../libgles1_1.0.0-2ubuntu2.2_amd64.deb ...
Unpacking libgles1:amd64 (1.0.0-2ubuntu2.2) ...
dpkg: error processing archive /var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1', which is also in package nvidia-340 340.106-0ubuntu3
Preparing to unpack .../libglvnd-dev_1.0.0-2ubuntu2.2_amd64.deb ...
Unpacking libglvnd-dev:amd64 (1.0.0-2ubuntu2.2) over (1.0.0-2ubuntu2.1) ...
dpkg: error processing archive /var/cache/apt/archives/libglvnd-dev_1.0.0-2ubuntu2.2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLESv1_CM.so', which is also in package nvidia-340 340.106-0ubuntu3
Errors were encountered while processing:
 /var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_amd64.deb
 /var/cache/apt/archives/libglvnd-dev_1.0.0-2ubuntu2.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
1

2 Answers 2

0

Your key problem is this:

trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1', which is also in package nvidia-340 340.106-0ubuntu3

This happens occasionally. You must choose between libgles1 and nvidia-340 340.106-0ubuntu3. apt remove one of them and then complete the install.

Being as this is the nvidia package, you may see an effect on your desktop but with failsafe X, you shouldn't end up with no GUI at all. It will just look strange until you reinstall the nvidia drivers.

Once you have resolved the conflict and done an apt update you may be able to get them both installed, but that depends on whether these packages are truly compatible on the one system, and that can also depend on where you got them from.

More dangerous solution

If it's really the only way, delete the file /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1 and attempt a apt -f install. Beware, though, that this means that your system will be in an untested state, and you should, at the very least, run a system checksum test to ensure every file is where it should be.

6
  • apt auto remove runs fails also. The dependency issue keeps stopping me from doing anything it seems.
    – peck
    Oct 7, 2018 at 23:41
  • @user535733 I beg to differ. apt --purge remove will always remove the package. Sometimes it will give you a warning, but it will do what you say. The package conflict resolution is the second step, which can be fixed by a catalogue update because this is almost always due to a file transitioning between packages. Oct 7, 2018 at 23:57
  • @peck, As @user535733 suggests, try apt remove first. apt autoremove may be a bit drastic. Oct 8, 2018 at 0:06
  • I'm not sure what I am removing.
    – peck
    Oct 9, 2018 at 15:39
  • The nvidia-340 package. sudo apt remove nvidia-340 Oct 9, 2018 at 23:40
0

I found this after posting all the fault into search. His answer corrected my issue but I had to do the second command instruction before the first. I am now clean updated and relieved. My second choice was to wait until the 18th and do a full install when 18.10 deploys.

Broken apt, can't update libglvnd due to unmet dependencies (Nvidia)

1
  • Yes. The --force-overwrite flag is effectively the same as my "dangerous solution". Oct 10, 2018 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.