Fatal error: Error while installing package: trying to overwrite '/usr/lib/x86_64-linux-gnu/libkColorPicker.so.0', which is also in package libkcolorpicker0 (And Gwenview no longer starts up)

Getting this issue when running pkcon update

Fatal error: Error while installing package: trying to overwrite '/usr/lib/x86_64-linux-gnu/libkColorPicker.so.0', which is also in package libkcolorpicker0

I tried even sudo apt --fix-broken install

I get this:

Preparing to unpack .../libkcolorpicker-qt6-0_0.3.1-0xneon+22.04+jammy+release+build2_amd64.deb ...
Unpacking libkcolorpicker-qt6-0:amd64 (0.3.1-0xneon+22.04+jammy+release+build2) over (0.3.0-0+22.04+jammy+release+build1) ...
dpkg: error processing archive /var/cache/apt/archives/libkcolorpicker-qt6-0_0.3.1-0xneon+22.04+jammy+release+build2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libkColorPicker.so.0', which is also in package libkcolorpicker0:amd64 0.1.6-2
Errors were encountered while processing:
 /var/cache/apt/archives/libkcolorpicker-qt6-0_0.3.1-0xneon+22.04+jammy+release+build2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

(And Gwenview no longer starts up)

1 Like

This fixed the issue:

sudo dpkg --remove --force-remove-reinstreq libkcolorpicker0

Then:

sudo apt full-upgrade
2 Likes

@dreaperxz – thank you for the steps to fix it.

In my case I had to run the following command after removing libkcolorpicker0:

$ sudo apt --fix-broken install
1 Like

That would have worked too. Even sudo pkcon update would have worked.

I got the same error using Discover update.
The proposed automated fix was not able to solve.

sudo dpkg --remove --force-remove-reinstreq libkcolorpicker0
sudo pkcon update

solved the problem as written

sudo dpkg --remove --force-remove-reinstreq libkcolorpicker0
sudo pkcon update

Worked for me. Thanks for solving this problem and sharing.

Sure thing. You are welcome, everyone.