php - Apt upgrade fail because of phpmyadmin (Updating debian 10 to 11)

one text

I'm trying to update a debian 10 server to 11. It runs an apache2 server with some php7.3, and uses a mariadb with phpmyadmin.

I followed a few tutorials in vain (last one I used). Everything works pretty well until I use sudo apt full-upgrade It manages to download the packages, but when it gets to phpmyadmin it crashes.

Pr?�paration du d?�paquetage de .../30-phpmyadmin_4%3a5.0.4+dfsg2-2+deb11u1_all.deb ...
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dpkg-maintscript-helper: error: file '/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint' not owned by package 'phpmyadmin:all'
dpkg-maintscript-helper: error: file '/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/sql-hint.js' not owned by package 'phpmyadmin:all'
dpkg-maintscript-helper: error: file '/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/show-hint.js' not owned by package 'phpmyadmin:all'
dpkg-maintscript-helper: error: file '/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/show-hint.css' not owned by package 'phpmyadmin:all'
dpkg-maintscript-helper: error: directory '/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint' contains files not owned by package phpmyadmin:all, cannot switch to symlink
dpkg: erreur de traitement de l'archive /tmp/apt-dpkg-install-7oxSMZ/30-phpmyadmin_4%3a5.0.4+dfsg2-2+deb11u1_all.deb (--unpack)?�:
 new phpmyadmin package pre-installation script subprocess returned error exit status 1

However it still manages to install debian 11 (I checked with lsb_release -a), but makes apt behave oddly, as I don't seem to have mysql anymore and the website can't connect to it.

root@SERV-TEST-UPDATE-v2:/home/informatique# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

Also doing an apt update after the error tells me that my 300+ packages can be updated. And an apt fix-broken install don't help.

Does anyone know where is the problem ?

Source