'Mariadb can't be installed on Debian Buster, : post-installation script subprocess returned error exit status 134

I am trying to install Mariadb on Debian but I am getting the error below when I try to install it.

Mariadb was actually working for me for a while. I just tried to reinstall it because it was having hard time with starting (probably broke after apt upgrade). So I removed it and tried to reinstall it.

4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64 GNU/Linux

Setting up mariadb-server-10.3 (1:10.3.12-2) ...
/var/lib/dpkg/info/mariadb-server-10.3.postinst: line 25:  9411 Done                    echo "$password_column_fix_query"
      9412 Aborted                 | $MYSQL_BOOTSTRAP 2>&1
      9416                       | $ERR_LOGGER
dpkg: error processing package mariadb-server-10.3 (--configure):
 installed mariadb-server-10.3 package post-installation script subprocess returned error exit status 134
dpkg: dependency problems prevent configuration of mariadb-test:
 mariadb-test depends on mariadb-server-10.3 (= 1:10.3.12-2); however:
  Package mariadb-server-10.3 is not configured yet.

dpkg: error processing package mariadb-test (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-server-10.3
 mariadb-test
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up mariadb-server-10.3 (1:10.3.12-2) ...
/var/lib/dpkg/info/mariadb-server-10.3.postinst: line 25:  9683 Done                    echo "$password_column_fix_query"
      9684 Aborted                 | $MYSQL_BOOTSTRAP 2>&1
      9685                       | $ERR_LOGGER
dpkg: error processing package mariadb-server-10.3 (--configure):
 installed mariadb-server-10.3 package post-installation script subprocess returned error exit status 134
dpkg: dependency problems prevent configuration of mariadb-test:
 mariadb-test depends on mariadb-server-10.3 (= 1:10.3.12-2); however:
  Package mariadb-server-10.3 is not configured yet.

dpkg: error processing package mariadb-test (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-server-10.3
 mariadb-test

thanks



Solution 1:[1]

This usually happens when you didn't remove mysql completely before trying to use mariadb or in your case you did not remove the mariadb package completely So try this.

sudo apt remove --purge mysql*
sudo apt remove --purge mysql
sudo apt remove --purge mariadb
sudo apt remove --purge mariadb*
sudo apt --purge remove mariadb-server

Then try re installing it again

sudo apt install mariadb-server mariadb-client

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 Christopher C Okonkwo