Dave Heinemann

Fedora 36 to 37 Upgrade: libheif "System Not Ready For Upgrade" error

Fedora 38 was finally released on April 14th, so last weekend I decided to upgrade from Fedora 36 to 37. I like to stay one major release behind so that any significant issues are sorted out by the time I upgrade.

However, I found that I couldn't start the upgrade process due to some kind of package dependency conflict with libheif. This post is a summary of how I diagnosed and fixed the issue, in case it's helpful for anyone else.

The Problem

I started the upgrade process by following the official upgrade guide. When it came time to download the Fedora 37 packages, they were all downloaded successfully. However, this error was encountered during the transaction tests:

$ sudo dnf system-upgrade download --releasever=37

(snip)

Error: Transaction test error:
    file /usr/lib64/libheif/libheif-libde265.so conflicts between attempted installs of libheif-hevc-1.15.1-2.fc37.1.x86_64 and libheif-freeworld-1.15.1-4.fc37.x86_64
    file /usr/lib64/libheif/libheif-x265.so conflicts between attempted installs of libheif-hevc-1.15.1-2.fc37.1.x86_64 and libheif-freeworld-1.15.1-4.fc37.x86_64

I tried upgrading anyway, but couldn't proceed:

$ sudo dnf system-upgrade reboot
Error: system is not ready for upgrade

Troubleshooting Steps

I have no idea what libheif is. It isn't installed on my system, and the path /usr/lib64/libheif doesn't exist.

I noticed that libheif-freeworld and libheif-hevc are both RPM Fusion free packages. Based on some advice I read online, I tried disabling the RPM Fusion free repositories:

$ sudo dnf config-manager --set-disabled rpmfusion-free
$ sudo dnf config-manager --set-disabled rpmfusion-free-updates

Then I retried downloading the Fedora 37 packages again to see what would happen. This produced a new, completely different set of errors:

Error: 
Problem 1: package compat-ffmpeg4-4.4.4-1.fc36.x86_64 requires libdav1d.so.5()(64bit), but none of the providers can be installed
    - libdav1d-0.9.2-2.fc36.x86_64 does not belong to a distupgrade repository
    - problem with installed package compat-ffmpeg4-4.4.4-1.fc36.x86_64
Problem 2: package ffmpeg-libs-5.0.3-1.fc36.x86_64 requires libilbc.so.0()(64bit), but none of the providers can be installed
    - ilbc-1.1.1-22.fc36.x86_64 does not belong to a distupgrade repository
    - problem with installed package ffmpeg-libs-5.0.3-1.fc36.x86_64
Problem 3: package qt5-qtwebengine-freeworld-5.15.12-1.fc36.1.x86_64 requires libicudata.so.69()(64bit), but none of the providers can be installed
    - package qt5-qtwebengine-freeworld-5.15.12-1.fc36.1.x86_64 requires libicui18n.so.69()(64bit), but none of the providers can be installed
    - package qt5-qtwebengine-freeworld-5.15.12-1.fc36.1.x86_64 requires libicuuc.so.69()(64bit), but none of the providers can be installed
    - libicu-69.1-6.fc36.x86_64 does not belong to a distupgrade repository
    - problem with installed package qt5-qtwebengine-freeworld-5.15.12-1.fc36.1.x86_64
Problem 4: package rpmfusion-free-release-36-1.noarch requires system-release(36), but none of the providers can be installed
    - fedora-release-workstation-36-21.noarch does not belong to a distupgrade repository
    - problem with installed package rpmfusion-free-release-36-1.noarch
Problem 5: package ffmpeg-libs-5.0.3-1.fc36.x86_64 requires libsrt.so.1.4()(64bit), but none of the providers can be installed
    - package ffmpeg-5.0.3-1.fc36.x86_64 requires ffmpeg-libs(x86-64) = 5.0.3-1.fc36, but none of the providers can be installed
    - srt-libs-1.4.4-2.fc36.x86_64 does not belong to a distupgrade repository
    - problem with installed package ffmpeg-5.0.3-1.fc36.x86_64
Problem 6: package ffmpeg-libs-5.0.3-1.fc36.x86_64 requires libSvtAv1Enc.so.0()(64bit), but none of the providers can be installed
    - package libavdevice-5.0.3-1.fc36.x86_64 requires ffmpeg-libs(x86-64) = 5.0.3-1.fc36, but none of the providers can be installed
    - svt-av1-libs-0.9.0-1.fc36.x86_64 does not belong to a distupgrade repository
    - problem with installed package libavdevice-5.0.3-1.fc36.x86_64
(try to add '--skip-broken' to skip uninstallable packages)

The recurring theme in these errors is ffmpeg. In hindsight I probably should have tried disabling the rpmfusion-nonfree repository too, as that may have made a difference.

The Solution

It looked like the issue might be related to ffmpeg in some way, but I didn't want to go through the effort of troubleshooting individual packages, so I decided to simply remove all third-party packages as a precaution. In my case, that looked like this:

$ sudo dnf repository-packages rpmfusion-nonfree remove
$ sudo dnf repository-packages rpmfusion-free remove
$ sudo dnf repository-packages code remove
$ sudo dnf repository-packages teams remove
$ sudo dnf repository-packages scootersoftware remove

This removed a bunch of packages, including ffmpeg. Then I was able to upgrade to Fedora 37 without encountering any further errors. Once the upgrade was complete, I reinstalled the handful of third-party packages I wanted to keep.

Do you have any thoughts or feedback? Let me know via email!

#Fedora #Linux