Continuing errors with an incomplete Bullseye-Migration (mariadb?)

Hi everyone, and a happy new year! :tada:

I’ve had an issue with my yunohost set-up for several months now: My migration to Debian Bullseye went wrong, and ever since I get warnings in my administration interface. During my winter vacation I now wanted to take the time and try addressing it, so I scrolled through forum posts and tried different sorts of things, but unfortunately I wasn’t successful in finding a solution so far. Maybe someone here can help?

My YunoHost server

Hardware: VPS, openvz amd64. running Linux kernel 4.19.0, Debian 11.5
YunoHost version: 11.0.10.2 (stable)
I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : none that I’m aware of

Description of my issue

For the day-to-day, everything is functioning fine. However, any attempts to update anything or run any migrations fail, also the usual commands such as

sudo apt --fix-broken install
sudo apt clean
sudo dpkg --configure -a
sudo apt autoremove

don’t change anything. (I’ve also tried rebooting the system or restarting multiple times of course). For example, this is the output I get when I run sudo dpkg --configure -a:

mariadb-common (1:10.5.18-0+deb11u1) wird eingerichtet ...
update-alternatives: Fehler: Alternativen-Pfad /etc/mysql/mariadb.cnf existiert                                                                                                   nicht
dpkg: Fehler beim Bearbeiten des Paketes mariadb-common (--configure):
 »installiertes mariadb-common-Skript des Paketes post-installation«-Unterprozes                                                                                                  s gab den Fehlerwert 2 zurück
dpkg: Abhängigkeitsprobleme verhindern Triggerverarbeitung für mariadb-server-10                                                                                                  .5:
 mariadb-server-10.5 hängt ab von mariadb-common (>= 1:10.5.15-0+deb11u1); aber:
  Paket mariadb-common ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes mariadb-server-10.5 (--configure):
 Abhängigkeitsprobleme - Trigger bleiben unverarbeitet
Fehler traten auf beim Bearbeiten von:
 mariadb-common
 mariadb-server-10.5

(My apologies it’s in German - if anyone could give me a hint on how to change my server language to English without accidentally breaking things even more than they already are I’d be thankful; I just don’t want to break anything else at the moment).

In short, I believe it all comes back to the faulty migrations, which is why I hope that maybe someone has an idea of how to untangle this half-baked process?

Here are the logs of what happens when I currently try to run the pending migrations: https://paste.yunohost.org/raw/rojexacuqu

And this is the previous migration log mentioned in the error log: https://paste.yunohost.org/raw/qowadakeda

Thank you so much for your consideration, time, and ideas!
Sending you many warm wishes :sun_with_face:

For future reference - in case anyone runs into the same issue: I was able to fix it by:

  1. copying the file /etc/mysql/my.cnf to /etc/mysql/mariadb.cnf
  2. running the following commands in this order:
sudo dpkg configure --a
sudo apt install --fix-broken
sudo apt upgrade
  1. Then I clicked on the skip button for the bullseye-migration, and was able to successfully run all other migrations.

Everything seems to be working fine at the moment, no errors visible - hope it stays that way! :slight_smile:

Please never run apt upgrade

The notation is confusing, but apt upgrade only upgrade packages which don’t require to install/remove additional dependencies. But in the context of upgrading the entire system to a new debian version, it’s likely that a lot of packages need to install/remove dependencies to upgrade.

This behavior is mainly historical (though I could be wrong) because it was considered “less safe” to install/remove dependencies.

Nowadays it’s really safe and in fact “safer” (because not upgrading all packages together may create inconsistencies) to upgrade all packages with apt dist-upgrade

apt dist-upgrade, as opposed to what the name suggest is not about “upgrading the distribution” as if it was meant only for major debian upgrades … it just means that it will also upgrade packages that need to remove/install dependencies

Anyway, TL;DR: just run apt dist-upgrade (or apt full-upgrade, it’s the same thing), get less troubles

And in the context of YunoHost, it would even be better to run yunohost tools upgrade system

1 Like

Oh, I didn’t know that! One always continues to learn new things, I guess. And I will for sure always remember this in the future now!

Thank you so much for taking the time to reply and explain this to me - greatly appreciated! :white_heart: :blush:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.