'CentOS Stream 8 - DNF Broken - Unable to Run Update/Upgrade

I thought I successfully upgraded from CentOS8 to Centos Stream 8, however I was never able to get dnf distro-sync to work. Now DNF appears to be broken and dnf upgrade throws unsatisfied dependencies for libsmartcols.so.1 in relation to DNF itself.

dnf distro-sync: When running the sync, the following appears:

Error: 
 Problem: The operation would result in removing the following protected packages: setup
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

I tried every possible combination of --skip-broken, --nobest --allowerasing, etc. to resolve. Tried using the vault versions, no difference. All of the old CentOS repos were removed, so the only repos in the /etc/yum.repos.d/ folder are -Stream-. I do not have any EPEL repos installed at this time.

cat /etc/centos-release => CentOS Stream release 8

The server survives reboots and seems to work correctly for everything else.

When running dnf -y upgrade -v, the following results:

dnf -y upgrade -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
DNF version: 4.7.0
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (CentOS Stream 8; generic; Linux.x86_64)'
repo: using cache for: appstream
appstream: using metadata from Tue 08 Feb 2022 07:27:22 PM EST.
repo: using cache for: baseos
baseos: using metadata from Tue 08 Feb 2022 07:26:22 PM EST.
repo: using cache for: extras
extras: using metadata from Tue 08 Feb 2022 04:08:34 PM EST.
Last metadata expiration check: 0:26:35 ago on Thu 10 Feb 2022 12:44:57 PM EST.
--> Starting dependency resolution
---> Package dnf-plugins-core.noarch 4.0.21-8.el8 will be upgraded
---> Package dnf-plugins-core.noarch 4.0.21-10.el8 will be an upgrade
---> Package libdnf.x86_64 0.63.0-5.el8 will be upgraded
---> Package libdnf.x86_64 0.63.0-7.el8 will be an upgrade
---> Package python3-dnf-plugins-core.noarch 4.0.21-8.el8 will be upgraded
---> Package python3-dnf-plugins-core.noarch 4.0.21-10.el8 will be an upgrade
---> Package python3-hawkey.x86_64 0.63.0-5.el8 will be upgraded
---> Package python3-hawkey.x86_64 0.63.0-7.el8 will be an upgrade
---> Package python3-libdnf.x86_64 0.63.0-5.el8 will be upgraded
---> Package python3-libdnf.x86_64 0.63.0-7.el8 will be an upgrade
--> Finished dependency resolution
Dependencies resolved.
==============================================================================================================================================================================================================
 Package                                                      Architecture                               Version                                             Repository                                  Size
==============================================================================================================================================================================================================
Upgrading:
 dnf-plugins-core                                             noarch                                     4.0.21-10.el8                                       baseos                                      71 k
 libdnf                                                       x86_64                                     0.63.0-7.el8                                        baseos                                     701 k
 python3-dnf-plugins-core                                     noarch                                     4.0.21-10.el8                                       baseos                                     230 k
 python3-hawkey                                               x86_64                                     0.63.0-7.el8                                        baseos                                     116 k
 python3-libdnf                                               x86_64                                     0.63.0-7.el8                                        baseos                                     778 k

Transaction Summary
==============================================================================================================================================================================================================
Upgrade  5 Packages

Total size: 1.9 M
Downloading Packages:
[SKIPPED] dnf-plugins-core-4.0.21-10.el8.noarch.rpm: Already downloaded                                                                                                                                      
[SKIPPED] libdnf-0.63.0-7.el8.x86_64.rpm: Already downloaded                                                                                                                                                 
[SKIPPED] python3-dnf-plugins-core-4.0.21-10.el8.noarch.rpm: Already downloaded                                                                                                                              
[SKIPPED] python3-hawkey-0.63.0-7.el8.x86_64.rpm: Already downloaded                                                                                                                                         
[SKIPPED] python3-libdnf-0.63.0-7.el8.x86_64.rpm: Already downloaded                                                                                                                                         
Using rpmkeys executable at /usr/bin/rpmkeys to verify signatures
Running transaction check
Error: transaction check vs depsolve:
libsmartcols.so.1()(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.25)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.28)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.29)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.30)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1()(64bit) is needed by python3-hawkey-0.63.0-7.el8.x86_64
libsmartcols.so.1()(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.25)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.27)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.28)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.29)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.30)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
To diagnose the problem, try running: 'rpm -Va --nofiles --nodigest'.
You probably have corrupted RPMDB, running 'rpm --rebuilddb' might fix the issue.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.

I have tried cleaning the packages (dnf clean all), removing the cache files, individually trying to update/upgrade each package, etc.. I'm out of ideas.

Any suggestions?



Solution 1:[1]

Afer a couple more hours of trying, I was able to resolve it by performing the following:

  1. Copy a CentOS-Base.repo file from another server
  2. Edit the repo file to reflect the vault.centos.org location, turn off gpgcheck
  3. dnf clean all
  4. dnf install libsmartcols-2.32.1-28.el8

Ran dnf -y upgrade again and it worked. Go figure.

Hopefully, this will help someone else with the same or similar issue.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AbriaCloud