0

I get this error after using the command:

keagan@KsPc:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libxss1:i386
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libgles1 libglvnd-dev
The following NEW packages will be installed:
  libgles1 libglvnd-dev
0 upgraded, 2 newly installed, 0 to remove and 37 not upgraded.
1 not fully installed or removed.
Need to get 0 B/14.6 kB of archives.
After this operation, 91.1 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 251820 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) ...
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)

Im new to Linux and I have no idea what to do with problems like these Please help

mook765
  • 18,644

2 Answers2

1

here's what worked for me. I am running Ubuntu 18.04 and encountered a similar error.

When the fix-broken command doesn't work,

sudo apt --fix-broken install

you can always use dpkg to force an overwrite of the software that isn't working. This worked for me, allowed me to continue to update software on my install, and reboot without a problem. Try at your own risk. :)

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_amd64.deb

If that works, try re-running apt fix-install

sudo apt install -f

And then you may need to run this in addition to get the nvidia drivers to upgrade.

sudo dist-upgrade

Let me know how it goes.

Here is a source describing the same method, and another source.

0

https://bugs.launchpad.net/ubuntu/+source/libglvnd/+bug/1791542

You can either wait for the fix or update as per the link.

The nvidia-340.106 driver will be updated to 340.107

Sima
  • 1