DEV Community

David Foley
David Foley

Posted on

dnf packaging errors for MariaDB and borgbackup

I recently encountered an error on a database server when using dnf (yum) on CentOS 8 Stream. Dependencies for MariaDB and borgbackup created a problem and there was an unusual fix which I hadn't previously been aware of.

TL;DR

  • Set module_hotfixes=true in MariaDB repo definition
  • Enabled powertools repository as recommended by Fedora EPEL team

The Problem

When I went to use the dnf package manager, I get the following error:

[david@mariadb0 ~]$ sudo dnf update
Last metadata expiration check: 12:00:00 ago on Mon 01 Jan 1970 00:00:00 UTC.
Error: 
 Problem 1: cannot install the best update candidate for package borgbackup-1.1.16-1.el8.x86_64
  - nothing provides python3.6dist(packaging) needed by borgbackup-1.1.17-1.el8.x86_64
 Problem 2: package MariaDB-shared-10.5.9-1.el8.x86_64 requires MariaDB-common, but none of the providers can be installed
  - cannot install the best update candidate for package mariadb-connector-c-3.1.11-2.el8_3.x86_64
  - package MariaDB-common-10.5.7-1.el8.x86_64 is filtered out by modular filtering
  - package MariaDB-common-10.5.8-1.el8.x86_64 is filtered out by modular filtering
  - package MariaDB-common-10.5.9-1.el8.x86_64 is filtered out by modular filtering
 Problem 3: package MariaDB-shared-10.5.9-1.el8.x86_64 requires MariaDB-common, but none of the providers can be installed
  - cannot install the best update candidate for package mariadb-connector-c-config-3.1.11-2.el8_3.noarch
  - package MariaDB-common-10.5.7-1.el8.x86_64 is filtered out by modular filtering
  - package MariaDB-common-10.5.8-1.el8.x86_64 is filtered out by modular filtering
  - package MariaDB-common-10.5.9-1.el8.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Enter fullscreen mode Exit fullscreen mode

The host hasn't been touched recently, this error arose spontaneously.

It turns out there are two issues here: a) Default package filtering is leading to MariaDB's dependencies not being resolved; b) The Fedora EPEL repository was not setup correctly, as a result borgbackup's dependencies cannot be resolved. Fortunately there are some easy fixes, however it was hard to track this down on the web, hence this blog post.

Fixing MariaDB

This bug was previously identified by the MariaDB community and I found a suggested fix in the bug report. The steps are as follows:

  1. Edit the MariaDB repository definition: sudo vi /etc/yum.repos.d/MariaDB.repo. Add module_hotfixes=true to the end of the file
  2. Run sudo dnf update --best --allowerasing

I have updated a stack exchange thread related to this with the advice.

Fixing borgbackup

This error arose because I did not pay attention to the advice for setting up the Fedora EPEL repository. Execute the following and then try dnf again:

  1. dnf install 'dnf-command(config-manager)'
  2. dnf config-manager --set-enabled powertools

This article was first posted at https://www.dfoley.ie/blog/dnf-packaging-errors-for-mariadb-and-borgbackup #indieweb #posse

Top comments (0)