Debian 11 error on upgrade, on mariadb??? Custombuild issue?

Richard G

Verified User
Joined
Jul 6, 2008
Messages
13,878
Location
Maastricht
Oke so got a DA notice that system packages update were available, doing update again likt apt-get update and apt dist-upgrade.

Then this happened:
Code:
[root@srv100: ~]# apt dist-upgrade              
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-5.10.0-24-amd64
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 318 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 55587 files and directories currently installed.)
Removing linux-image-5.10.0-24-amd64 (5.10.179-5) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.10.0-24-amd64
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.10.0-26-amd64
Found initrd image: /boot/initrd.img-5.10.0-26-amd64
Found linux image: /boot/vmlinuz-5.10.0-25-amd64
Found initrd image: /boot/initrd.img-5.10.0-25-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
done
Setting up mariadb-common (1:10.5.21-0+deb11u1) ...
update-alternatives: error: alternative path /etc/mysql/mariadb.cnf doesn't exist
dpkg: error processing package mariadb-common (--configure):
 installed mariadb-common package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of libmariadb3:amd64:
 libmariadb3:amd64 depends on mariadb-common; however:
  Package mariadb-common is not configured yet.

dpkg: error processing package libmariadb3:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-common
 libmariadb3:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)]

What is apt doing with mariadb-common?? I thought mariadb should be handled by Custombuild.
This is the same VPS I earlier had some very strange issues with MariaDB which suddenly dissapeared after the 3 rd reinstall of mariadb.

Now I'm starting to get suspicious that mariadb is not excluded from the package manager as good as this is done with yum. Now causing this error again.

Debian should not even try to setup mariadb-common in the first place.
So how can I fix this?

@fln?
 
CustomBuild on Debian systems does explicitly prevent MariaDB packages from being installed. On fresh systems they are not present and does not cause any problems. However if over time there happens to be a package that tries to pull mariadb-common as a dependency it will get installed and mess up config files for sure.

At the moment it is the server admin responsibility to not install MariaDB distro packages if CustomBuild is used for installing it. And it is also responsibility of the admin to ensure they will not get installed at some later point in time.

However this could be treated as a feature request for CB to start pro-actively blocking the distro MariaDB packages and be on par with what CB does on RHEL based systems.
 
However this could be treated as a feature request for CB to start pro-actively blocking the distro MariaDB packages and be on par with what CB does on RHEL based systems.
Maybe that would be nice, because I didn't install anything of mysql or mariadb from the OS. Not on installation of the VPS or anything else.

In yum it's Custombuild who blocks the mariadb* and mysql* via the exclude line. I normally never use Debian, this is a first timer, only temporarily on a VPS.

Since this is done in yum this way, I naturally expected the same blockage to be done some way for apt in Debian by Custombuild.

The only thing I did now was a apt dist-upgrade which indeed checks dependecies. So maybe I'm lucky then that this error appeared and did not mess up my configuration I guess.

I will not run dist-upgrade anymore on this system. Debian is giving me more issues than I expected. :)
 
CustomBuild on Debian systems does explicitly prevent MariaDB packages from being installed.
@fln Well... In that case it seems I'm correct there is a bug in Custombuild here.

I just checked for you if this is true:
Code:
[root@srv100: ~]# apt-mark showhold
[root@srv100: ~]#

So Custombuild did not prevent anything. While on Centos systems.....
exclude=apache* httpd* mod_* mysql* MySQL* mariadb* da_* *ftp* exim* sendmail* php* bind-chroot* dovecot*
 
Thank you for confirming. So what @fln said is incorrect then that Custombuild explicitly prevent MariaDB packages from being installed.
Which is now causing my mariadb-common issue and I'm afraid to uninstall it to get it fixed.
I already excluded it, also that libmariadb but it still keeps giving the same notice on apt upgrade.
 
Maybe related, I was running MariaDB 10.6 on Debian 10 but after the upgrade to Debian 11 I'm getting:

Code:
/usr/local/directadmin/custombuild# ./build update_versions
Updating MariaDB
Automatic migration from MySQL 0 to MariaDB 10.6 is not supported. More info: https://docs.directadmin.com/other-hosting-services/mariadb-mysql/general.html#how-to-reinstall-mysql
 
I never encountered a Mysql 0. What is stated in your options.conf about databases?
Maybe run ./build update first again?
 
Code:
# MySQL Settings
mysql=5.6
mariadb=10.6
mysql_inst=mariadb
mysql_backup=no
mysql_backup_gzip=no
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no

Running ./build update or the suggestions as outlined on https://docs.directadmin.com/other-...adb-mysql/general.html#how-to-reinstall-mysql result in the same error. Wondering how it detects the Mysql 0, everything is still working as expected, sites run, PHPMyAdmin works etc.
 
I would stronly advise to set the "mysql_backup=yes" because then a backup is made on every update of Mariadb/Mysql.

Very odd indeed that Mysql 0. I presume you did a ./build all d after doing the major update from Debian 10 to Debian 11.
However that would probably not fix this mysql/mariadb issue.

Can you connect via ssh still to mariadb fully, so really login?
mysql -u da_admin -p
enter the da_admin mysql pass and see if no error occurs. If not, then you have a different issue and maybe new topic is better then with the mysql 0 in the title.
 
Interesting; mysql -u da_admin -p trows a:

Code:
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
 
Are any libncurses installed?
ls -1 /usr/lib/x86_64-linux-gnu/libncurses*

I got 5 and 6 in there, probably not that good.

If you have 6 then maybe symlinks will help or install libncurses 5.
sudo apt-get install libncurses5
 
Back
Top