0

I encountered the same problems as these two questions :

trying to overwrite '/usr/bin/opencv_haartraining', which is also in package libopencv2.3-bin 2.3.1+svn6514+branch23-12~oneiric

Package system is broken. How to fix it?

They both suggested to remove the conflicting package and update and all after. However, my conflicting package is nvidia-340 340.106-0ubuntu3, which I'm kinda hesitant to remove.

The exact error i've got :

$ 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).

$ sudo apt --fix-broken install 

Reading package lists... Done

Building dependency tree

Reading state information... Done

Correcting dependencies... Done

The following additional packages will be installed: libgles1 libglvnd-dev

The following NEW packages will be installed: libgles1

The following packages will be upgraded: libglvnd-dev

1 upgraded, 1 newly installed, 0 to remove and 36 not upgraded. 51 not fully installed or removed. Need to get 0 B/14,6 kB of archives.

After this operation, 66,6 kB of additional disk space will be used.

Do you want to continue? [Y/n] Y (Reading database ... 276279 files and directories currently installed.) 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

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

Errors were encountered while processing:

/var/cache/apt/archives/libglvnd-dev_1.0.0-2ubuntu2.2_amd64.deb

/var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

  • Try this askubuntu.com/questions/1077595/… – Kristopher Ives Sep 26 '18 at 2:46
  • Thank you, it worked. I cannot comment there because I don't have enough reputation so if you know what I just did, can you explain please ? – Alex Sep 26 '18 at 12:42
  • You fixed problems that Nvidia should have fixed but they are bad at creating Linux packages/drivers. For 99% of programs/packages you'll never encounter such errors, but as I mentioned Nvidia is terrible at making packges and drivers for Linux. – Kristopher Ives Sep 26 '18 at 15:08
  • 1
    Great ! I'm kinda better than Nvidia then :P Thank you ! – Alex Sep 26 '18 at 21:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.