Unable to downgrade package from Rawhide to 28
I'm on a system running Fedora 28. I installed a program that needed to be at release version 29 (the version in the Fedora 28 repo didn't work as far as I knew and compiling from source had failed). I found a way to get the version in the Fedora 28 repository to work, and now I would like to downgrade all of the packages at release version 29 to 28.
The best solution for this I could find was dnf distro-sync
, but one package frustratingly refuses to downgrade no matter what I try, even with --allowerasing added to the command. The error is
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
file /usr/lib64/libgdbm.so.5.0.0 from install of gdbm-libs-1:1.14.1-4.fc28.x86_64 conflicts with file from package compat-gdbm-libs-1.14.1-6.fc29.x86_64
Error Summary
-------------
I've tried:
- Adding --releasever=28 to the command
- Adding --best to the command
- Adding --skip-broken to the command
- Removing compat-gdbm-libs (DNF wants to remove 4GB of core system packages when I try this, so I didn't go through with this one)
sudo dnf distro-sync compat-gdbm-libs
, has the result (with or without --releasever=28)Package compat-gdbm-libs-1.14.1-6.fc29.x86_64 is already installed, skipping. Dependencies resolved. Nothing to do. Complete!
Downgrading
compat-gdbm-libs
with the resultPackages for argument compat-gdbm-libs available, but not installed. Error: No packages marked for downgrade.
dnf info compat-gdbm-libs
Installed Packages
Name : compat-gdbm-libs
Version : 1.14.1
Release : 6.fc29
Arch : x86_64
Size : 104 k
Source : compat-gdbm-1.14.1-6.fc29.src.rpm
Repo : @System
From repo : rawhide
Summary : Libraries files for gdbm
URL : http://www.gnu.org/software/gdbm/
License : GPLv3+
Description : Libraries for the Gdbm GNU database indexing library
Lesson learned: --nodep is a dangerous option in rpm. I removed the compat-gdbm-libs package with rpm --nodep -e compat-gdbm-libs, after which the distro-sync command completed beautifully. Except that afterward, 'sudo', 'dnf', 'ls', 'cd', and every other command I tried wasn't recognized. Rebooting brought me to a dracut emergency prompt. This is bad.
I can boot off of a flash drive and take a look at the system since I don't think I'll be able to do much via the dracut prompt. Is there a way to install a package to a mounted Fedora system? I'm not sure if dnf will work in chroot here.
Follow up: For this problem, I ended up having to reinstall Fedora. Today, bash stopped working after temporarily installing an F29 package and downgrading it back to F28 (with dnf, not rpm --nodeps). I was able to restore the system though:
From a live environment as root:
cryptsetup luksOpen /dev/nvme0n1 fedora-on-disk
Check layout with
lsblk
Mount root, home, and boot file systems listed under fedora-on-disk
Install via dnf:
dnf install redhat-lsb --installroot /mnt
Unmount, re-encrypt, and reboot.
Hopefully this helps anyone else with this problem.