Error when upgrading Neon to 24.04 - conflicting package libappstreamqt-3

Hello. I’m using this configuration and tried to upgrade to the latest LTS version of Neon using Discover.

Operating System: KDE neon 6.3
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.11.0-17-generic (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Pentium® Silver N5030 CPU @ 1.10GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 605
Manufacturer: LENOVO
Product Name: 82AT
System Version: IdeaPad Duet 3 10IGL5

The discover Update tab tells me there are 74 packages ready to be upgraded. After clicking “Update All”, I am prompted to restart to complete the update process, but when I login again, I receive this notification:

Failed Offline Update
Failed to update 1 package
Error while installing package: trying to overwrite '/usr/lib/x86_64-linux-gnu/libAppStreamQt.so.3', which is also in package libappstreamqt-3

I tried the following command in the console:
sudo pkcon update
But I receive the same message:
Fatal error: Error while installing package: trying to overwrite '/usr/lib/x86_64-linux-gnu/libAppStreamQt.so.3', which is also in package libappstreamqt-3

I tried to do a full upgrade with apt, which gives me a bit more information, but still breaks on the same package.

pierre@Dalna:~$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
Entering ResolveByKeep
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  libgps28 libicu70 libkdecorations2-6 libqalculate23 libsnapd-glib1 libsnapd-qt1 libsoup-2.4-1 libsoup2.4-common plasma-discover-common
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  ddcutil debconf-kde-data debconf-kde-helper i2c-tools libappstreamqt3 libdebconf-kde1 libi2c0 libqalculate22t64 libsnapd-qt-2-1
  linux-headers-6.11.0-19-generic linux-headers-6.8.0-55 linux-headers-6.8.0-55-generic linux-hwe-6.11-headers-6.11.0-19 linux-hwe-6.11-tools-6.11.0-19
  linux-image-6.11.0-19-generic linux-image-6.8.0-55-generic linux-modules-6.11.0-19-generic linux-modules-6.8.0-55-generic
  linux-modules-extra-6.11.0-19-generic linux-modules-extra-6.8.0-55-generic linux-tools-6.11.0-19-generic linux-tools-6.8.0-55
  linux-tools-6.8.0-55-generic read-edid
The following packages will be upgraded:
  appstream apt-config-icons apt-config-icons-hidpi apt-config-icons-large apt-config-icons-large-hidpi breeze breeze-cursor-theme cryptsetup
  cryptsetup-bin cryptsetup-initramfs drkonqi-pk-debug-installer firefox gir1.2-packagekitglib-1.0 kde-style-breeze kf6-frameworkintegration krb5-locales
  kwin-style-breeze libappstreamqt5-3 libcryptsetup12 libgssapi-krb5-2 libgssapi-krb5-2:i386 libk5crypto3 libk5crypto3:i386 libkrb5-3 libkrb5-3:i386
  libkrb5support0 libkrb5support0:i386 libpackagekit-glib2-18 libpowerdevilcore2 libpq5 libraptor2-0 linux-generic linux-generic-hwe-24.04
  linux-headers-generic linux-headers-generic-hwe-24.04 linux-image-generic linux-image-generic-hwe-24.04 linux-libc-dev linux-tools-common packagekit
  packagekit-tools plasma-browser-integration plasma-desktop plasma-discover plasma-discover-backend-flatpak plasma-discover-backend-snap
  plasma-discover-common plasma-workspace plasma5support powerdevil powerdevil-data signal-desktop thermald wpasupplicant
54 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/684 MB of archives.
After this operation, 583 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 248374 files and directories currently installed.)
Preparing to unpack .../libappstreamqt3_1.0.4-1+24.04+noble+release+build1_amd64.deb ...
Unpacking libappstreamqt3:amd64 (1.0.4-1+24.04+noble+release+build1) ...
dpkg: error processing archive /var/cache/apt/archives/libappstreamqt3_1.0.4-1+24.04+noble+release+build1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libAppStreamQt.so.3', which is also in package libappstreamqt-3:amd64 1.0.2-0zneon+22.04+jammy+release+build2
Errors were encountered while processing:
 /var/cache/apt/archives/libappstreamqt3_1.0.4-1+24.04+noble+release+build1_amd64.deb

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

From what I understand, the noble package cannot overwrite files from the jammy package (isn’t it what it should do?). I don’t remember having toyed with the plasma packages before.

Is there a way to force the overwrite, and would it be safe to do so? Otherwise, how could I fix this package issue?

Should be safe but who knows for certain until you do it.

dpkg -i --force-overwrite /var/cache/apt/archives/libappstreamqt3_1.0.4-1+24.04+noble+release+build1_amd64.deb

As root or with sudo in front of it if setup for using that method.

Edit: and now I think a

dpkg --configure -a

Will most probably be needed and possibly a

apt --fix-broken install

May be needed too if it did not upgrade/full-upgrade the packages after the configure step.

This has been seen by one or more very late upgraders, I think.

It isn’t that the packages are from Noble and Jammy, but that two different packages have the same file.:
libappstreamqt3 from the current package set and libappstreamqt-3 from the old packageset from Jammy (and Noble, until ~January) both provide the file
/usr/lib/x86_64-linux-gnu/libAppStreamQt.so.3

Don’t ask why there was this small file name change, I can’t tell you. I don’t understand much of the intricacies and incantations used with Debian packaging. But this didn’t happen to people who upgraded before the middle of January when the name change seems to have taken place. (The 24.04 move happened in October.)

Since the old jammy package isn’t used anyway, you do want to force dpkg to overwrite this:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libappstreamqt3_1.0.4-1+24.04+noble+release+build1_amd64.deb

Afterwards, if everything is fine, running apt autoremove should hopefully clear out any excess chaff you don’t need as well. If it isn’t removed, you might look at uninstalling libappstreamqt-3.

1 Like

Thanks you both for the very quick reply. The dpkg --force-overwrite command worked fine, and the upgrade process completed successfully!