Conflicting packages with dnf but no further information

Hi, I’m new here!

I’m trying to update packages, but when I do dnf update, I get:

$ sudo dnf update
Copr repo for PyCharm owned by phracek                                                                                                                                                                         17 kB/s |  45 kB     00:02    
Fedora 37 - x86_64                                                                                                                                                                                            3.5 MB/s |  82 MB     00:23    
Fedora 37 openh264 (From Cisco) - x86_64                                                                                                                                                                      1.8 kB/s | 2.5 kB     00:01    
Fedora Modular 37 - x86_64                                                                                                                                                                                    2.4 MB/s | 3.8 MB     00:01    
Fedora 37 - x86_64 - Updates                                                                                                                                                                                  5.5 MB/s |  40 MB     00:07    
Fedora Modular 37 - x86_64 - Updates                                                                                                                                                                          1.6 MB/s | 2.9 MB     00:01    
google-chrome                                                                                                                                                                                                 7.1 kB/s | 3.6 kB     00:00    
RPM Fusion for Fedora 37 - Free                                                                                                                                                                               274 kB/s | 683 kB     00:02    
RPM Fusion for Fedora 37 - Free - Updates                                                                                                                                                                     269 kB/s | 445 kB     00:01    
RPM Fusion for Fedora 37 - Nonfree                                                                                                                                                                            196 kB/s | 248 kB     00:01    
RPM Fusion for Fedora 37 - Nonfree - NVIDIA Driver                                                                                                                                                             15 kB/s |  14 kB     00:00    
RPM Fusion for Fedora 37 - Nonfree - Steam                                                                                                                                                                    2.6 kB/s | 2.1 kB     00:00    
RPM Fusion for Fedora 37 - Nonfree - Updates                                                                                                                                                                   44 kB/s | 100 kB     00:02    
TeamViewer - x86_64                                                                                                                                                                                           639 kB/s | 560 kB     00:00    
Fedora VirtualBox Repo                                                                                                                                                                                         71 kB/s |  94 kB     00:01    
Error: 
 Problem: conflicting requests
(try to add '--skip-broken' to skip uninstallable packages)

If I do: dnf update -v, I get:

# dnf update -v
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync, system-upgrade
DNF version: 4.16.2
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (Fedora Linux 37; workstation; Linux.x86_64)'
repo: using cache for: phracek-PyCharm
phracek-PyCharm: using metadata from Sun 16 Jul 2023 09:58:45 AM +03.
repo: using cache for: fedora
fedora: using metadata from Sat 05 Nov 2022 11:04:38 AM +03.
repo: using cache for: fedora-cisco-openh264
fedora-cisco-openh264: using metadata from Thu 06 Oct 2022 02:01:40 PM +03.
repo: using cache for: fedora-modular
fedora-modular: using metadata from Sat 05 Nov 2022 10:58:03 AM +03.
repo: using cache for: updates
updates: using metadata from Tue 31 Oct 2023 04:08:03 AM +03.
repo: using cache for: updates-modular
updates-modular: using metadata from Sat 16 Sep 2023 03:16:21 AM +03.
repo: using cache for: google-chrome
google-chrome: using metadata from Fri 27 Oct 2023 09:47:50 PM +03.
repo: using cache for: rpmfusion-free
rpmfusion-free: using metadata from Fri 11 Nov 2022 07:54:42 PM +03.
repo: using cache for: rpmfusion-free-updates
rpmfusion-free-updates: using metadata from Fri 27 Oct 2023 01:34:27 PM +03.
repo: using cache for: rpmfusion-nonfree
rpmfusion-nonfree: using metadata from Fri 11 Nov 2022 08:25:12 PM +03.
repo: using cache for: rpmfusion-nonfree-nvidia-driver
rpmfusion-nonfree-nvidia-driver: using metadata from Fri 20 Oct 2023 02:56:25 PM +03.
repo: using cache for: rpmfusion-nonfree-steam
rpmfusion-nonfree-steam: using metadata from Thu 10 Aug 2023 07:27:30 PM +03.
repo: using cache for: rpmfusion-nonfree-updates
rpmfusion-nonfree-updates: using metadata from Fri 27 Oct 2023 02:04:05 PM +03.
repo: using cache for: teamviewer
teamviewer: using metadata from Tue 24 Oct 2023 09:26:19 AM +03.
repo: using cache for: virtualbox
virtualbox: using metadata from Tue 17 Oct 2023 12:23:00 PM +03.
Last metadata expiration check: 0:00:45 ago on Tue 31 Oct 2023 02:40:02 PM +03.
--> Starting dependency resolution
--> Finished dependency resolution
Error: 
 Problem: conflicting requests
(try to add '--skip-broken' to skip uninstallable packages)

I guess there are conflicting stuff, but I cannot know which one.
I tried dnf autoremove, dnf clean all, dnf update --skip-broken without any luck.

Any help is appreciated, thanks!

Have you tried dnf upgrade --refresh .You can also disable the teamviewer and virtualbox repo and try to update again to see if one of the repos is the issue .

1 Like

Thanks for the suggestion! Neither that one worked.

I also tried disabling virtualbox and teamviewer, but hopeless:

dnf config-manager --set-disabled teamviewer
dnf clean all && dnf update # failed
dnf config-manager --set-disabled virtualbox
dnf clean all && dnf update # failed
sudo dnf autoremove teamviewer
dnf clean all && dnf update # failed
dnf remove VirtualBox-7.0 virtualbox*
dnf clean all && dnf update # failed

I also tried to do dist-upgrade. But it seems it requires me to first upgrade all packages.

Edit 1: Moreover, I removed other repositories too:

# dnf clean all && dnf update
25 files removed
Fedora 37 - x86_64                                                                                      6.4 MB/s |  82 MB     00:12    
Fedora 37 openh264 (From Cisco) - x86_64                                                                856  B/s | 2.5 kB     00:02    
Fedora 37 - x86_64 - Updates                                                                            4.9 MB/s |  40 MB     00:08    
Last metadata expiration check: 0:00:01 ago on Tue 31 Oct 2023 05:57:05 PM +03.
Error: 
 Problem: conflicting requests
(try to add '--skip-broken' to skip uninstallable packages)

but it seems the error continues. Is there a command I can use to list recently installed packages? Bash history does not hold the timestamps, but it seems the last software I installed was months ago.

Edit 2: I removed all recently installed packages (from the last 5-6 months), and the issue is still there:

sudo dnf autoremove samba-common-tools samba-client samba-common-tools virt-viewer qemu-kvm libvirt virt-install bridge-utils~ i3 remmina

I’m starting to think there is a problem with dnf. For example, there was a conflict in the past, but then I removed that package, and conflict is resolved. However, dnf still thinks there is a conflict because of some cache or something (I don’t know the internal details of dnf).

Edit 3: Tried dnf5 from here → GitHub - rpm-software-management/dnf5: Next-generation RPM package management system
The result is the same.

Edit 4: I found dnf history command. I used it to find out last successful update which was 2 weeks ago. I removed all packages installed later than this date. But still the problem persists…

ID     | Command line                                                                      | Date and time    | Action(s)      | Altered
----------------------------------------------------------------------------------------------------------------------------------------
   135 | remove qemu-kvm virt-manager                                                      | 2023-10-31 18:20 | Removed        |   16   
   134 | remove code                                                                       | 2023-10-31 18:10 | Removed        |    1   
   133 | remove dnf5                                                                       | 2023-10-31 18:09 | Removed        |    4   
   132 | install dnf5                                                                      | 2023-10-31 18:08 | I, U           |    5  <
   131 | autoremove samba-common-tools samba-client samba-common-tools virt-viewer qemu-kv | 2023-10-31 18:03 | Removed        |  147 >E
   130 | remove bellsoft-java20-runtime-full                                               | 2023-10-31 17:49 | Removed        |    1   
   129 | remove VirtualBox-7.0 virtualbox*                                                 | 2023-10-31 17:42 | Removed        |    2 EE
   128 | remove teamviewer                                                                 | 2023-10-31 17:36 | Removed        |    1 EE
   127 | autoremove                                                                        | 2023-10-31 15:20 | C, E           |   41 EE
   126 | install dnf-plugin-system-upgrade --best                                          | 2023-10-31 14:47 | Upgrade        |    2   
   125 | install remmina                                                                   | 2023-10-24 10:54 | Install        |    6   
   124 | install i3                                                                        | 2023-10-21 15:00 | Install        |   21   
   123 | -y install bridge-utils libvirt virt-install qemu-kvm                             | 2023-10-19 15:39 | Install        |    7 EE
   122 | install -y qemu-kvm virt-manager                                                  | 2023-10-19 15:39 | Install        |    9   
   121 | update                                                                            | 2023-10-17 23:58 | O, U           |   18 EE
   120 | install virt-viewer                                                               | 2023-10-16 13:51 | Install        |    1   
   119 | update                                                                            | 2023-10-13 17:55 | Upgrade        |   42 E<
   118 | update                                                                            | 2023-10-13 17:52 | C, E, I, U     |  178 >#

Wonderful problem you have here.

Removing everything that does not come from a fedora or rpmfusion repo has helped me overcome this type of issue. Start with all the repos you use enabled and fresh metadata.

dnf repolist
dnf clean all
dnf makecache

Get a list of packages to remove.

dnf -C rq --qf='%{vendor} %{name}' --installed | grep -Ev '^Fedora Project |^RPM Fusion '

You may want to save this list and try to install them afresh after the update. Once the packages are removed (dnf remove <package>) go ahead and disable the non-fedora/rpmfusion repos and refresh the metadata.

dnf repolist
dnf clean all
dnf makecache

Hopefully the update will now succeed.

Thanks for the message! Unfortunately, it did not work.

dnf -C rq --qf='%{vendor} %{name}' --installed | grep -Ev '^Fedora Project |^RPM Fusion ' > packages.txt results in:

Google LLC google-chrome-stable
JGraph <support@draw.io> draw.io
Resilio, Inc. resilio-sync

Then I removed them: dnf remove google-chrome-stable draw.io resilio-sync

Then I tried again (repolist+clean all+makecache+install), but the result is still the same:

Error: 
 Problem: conflicting requests
(try to add '--skip-broken' to skip uninstallable packages)

You can verify the repo name with dnf repolist, which shows only the currently enabled repos, then use the name in the left column to set that repo as disabled.

What do you get with sudo dnf distrosync. Please post the full output if it is relatively short.

You showed above the output of dnf history and many of the entries show that there were errors, including the one shown for 10/13 (we cannot see what happened before that date). Each should have been addressed as soon as it was seen. Several also reflect in the Altered column rpm alterations that were not done by dnf according to the man page.

              • >: The RPM database was changed, outside DNF, after the transaction

              • <: The RPM database was changed, outside DNF, before the transaction

I’m stumped so far. I usually have more to go on from the output of the failed dnf update attempt which makes this issue so wonderful.

Did you enable/disable repos as described?

A couple more commands to evaluate state:

df -h
dnf check
rpm -Va

The df command indicates if there is free space on storage. The dnf command returns 0 if the check passes. The rpm verification command output is something I have manually evaluated looking for problems.

Thanks for the message! I just wanted to check if it gets better after reboot and realized that the default kernel is not the latest one in the GRUB screen (I changed it at some point because of some module signing reason I don’t exactly remember now).

I switched from 6.2.15-200.fc37 to the new one 6.4.13-100.fc37, and everything started to work again. Thanks very much for the help (@computersavvy @steppybug ), that was not very straightforward : )

Developers might want to add some error message indicating such a case. I’m tagging the topic as solved.

1 Like

Great going.

Finding the root cause seems to be no longer in the cards though it would be fun to know. Hawkey has a get_running_kernel () function so my curiosity is growing. Could it be that the system was running on the 6.2.15-200.f37 kernel yet the rpms were erased? Just a wild shot in the dark. Since I do not have the inclination to attempt to replicate this I better shut up.

Not necessarily the kernel rpms, but supporting rpms for software being updated may have been removed and library files may have had mismatched versions. Yes, there were major changes between the 6.2.15 kernel and the 6.4.13 kernel as well as all the surrounding software.

1 Like