Package fails because Mate is trying to overwrite something from another package

I’m having problems upgrading libjepg8. Apparently thers a file that is used by another package that is causing it to error out. I have tried any number of combinations of force instal and dpkg, to no avail. Here’s what it’s telling me:

[CODE] wolf@wolf-media:~$ sudo apt list --upgradeable
Listing… Done
libjpeg8/oldstable 8d-1+deb7u1 armhf [upgradable from: 8c-2ubuntu8]
N: There is 1 additional version. Please use the ‘-a’ switch to see it
wolf@wolf-media:~$ sudo apt list --upgradeable -a
Listing… Done
libjpeg8/oldstable 8d-1+deb7u1 armhf [upgradable from: 8c-2ubuntu8]
libjpeg8/xenial,xenial,now 8c-2ubuntu8 armhf [installed,upgradable to: 8d-1+deb7u1]

wolf@wolf-media:~$ sudo apt upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages will be upgraded:
libjpeg8
The following packages will be DOWNGRADED:
smplayer-skins
1 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 360 kB of archives.
After this operation, 239 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.raspbian.org/raspbian wheezy/main armhf libjpeg8 armhf 8d-1+deb7u1 [132 kB]
Get:2 http://ppa.launchpad.net/ubuntu-pi-flavour-makers/ppa/ubuntu xenial/main armhf smplayer-skins all 2:15.2.0-1~xenial1 [229 kB]
Fetched 360 kB in 2s (159 kB/s)
(Reading database … 175902 files and directories currently installed.)
Preparing to unpack …/libjpeg8_8d-1+deb7u1_armhf.deb …
Unpacking libjpeg8:armhf (8d-1+deb7u1) over (8c-2ubuntu8) …
dpkg: error processing archive /var/cache/apt/archives/libjpeg8_8d-1+deb7u1_armhf.deb (–unpack):
trying to overwrite ‘/usr/lib/arm-linux-gnueabihf/libjpeg.so.8’, which is also in package libjpeg-turbo8:armhf 1.4.2-0ubuntu3
Preparing to unpack …/smplayer-skins_2%3a15.2.0-1~xenial1_all.deb …
Unpacking smplayer-skins (2:15.2.0-1~xenial1) over (2:15.2.0-1~xenial1) …
Errors were encountered while processing:
/var/cache/apt/archives/libjpeg8_8d-1+deb7u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)[/CODE]

I’m running 16.04.2 on a raspi 3.

I don’t have a Pi with Ubuntu MATE and I’m not sure if these packages are preinstalled but you can try to remove them and see what happens:

sudo apt-get remove --purge libjpeg8 libjpeg-turbo8 smplayer-skins

Of course, if the list of removed packages seem odd (like trying to remove half of your system), don’t validate… In doubt, paste the list of the packages here.

If nothing too bad happens, you’s probably need to remove orphaned dependancies:

sudo apt-get autoremove --purge

You can then try to reinstall either libjpeg8 or libjpeg-turbo8 (not both, as they seem to be the ones that have common files) and then smplayer-skins.

1 Like

removing libpeg-turbo8 solved the problem. Thanks.