Ubuntu – DPKG error, conflict while installing packages

aptdependenciesdpkgpackage-managementupgrade

Keep trying to install things, but the console will spit out (apt –fix-broken install was when I tried to fix it):

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:
  libglvnd-core-dev
The following packages will be upgraded:
  libglvnd-core-dev
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 0 B/153 kB of archives.
After this operation, 2,226 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 253708 files and directories currently installed.)
Preparing to unpack .../libglvnd-core-dev_1.2.0-1~e~padoka0_amd64.deb ...
Unpacking libglvnd-core-dev:amd64 (1.2.0-1~e~padoka0) over (1.1.1-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libglvnd-core-dev_1.2.0-1
~e~padoka0_amd64.deb (--unpack):
 trying to overwrite '/usr/include/EGL/egl.h', which is also in package libegl1-
mesa-dev:amd64 19.2.1-1ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libglvnd-core-dev_1.2.0-1~e~padoka0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

This happens with every package I attempt to install, and when I try to remove the package, it tells me it can't due to broken dependencies.

apt remove libglvnd-dev
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:
 libegl1-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
 libgl1-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
 libgles2-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

And if I can't remove it I can't fix the issue. I've used the Linux CMD for about 3 years now off and on, and I'm new to complications like this.

Best Answer

This worked for me:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libglvnd-core-dev_1.2.0-1~b~padoka0_amd64.deb
Related Question