I'm running Ubuntu 14.04 on a Digital Ocean VM. I'm trying to install MariaDB 10.1. When doing so, I get the following error:

Setting up mariadb-server-10.1 (10.1.8+maria-1~trusty) ...
dpkg: error processing package mariadb-server-10.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.1 (= 10.1.8+maria-1~trusty); however:
  Package mariadb-server-10.1 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
     Errors were encountered while processing:
 mariadb-server-10.1
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Here is what I've tried to fix this:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mariadb-server

AND

restarting the machine

I was searching Stack Exchange and other Linux forms for a while and I cannot figure out what is causing this. I appreciate any help that could be offered!

UPDATE: Here is the output of apt-get install -f:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mariadb-server-10.1 (10.1.8+maria-1~trusty) ...
dpkg: error processing package mariadb-server-10.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.1 (= 10.1.8+maria-1~trusty); however:
  Package mariadb-server-10.1 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-server-10.1
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
    
Run sudo apt-get install -f and post the output. – Michael Hampton Nov 14 '15 at 22:20
    
@MichaelHampton I pasted the info in the updated question. I looked at the output before, it's not very useful. – Zach Russell Nov 15 '15 at 15:14
    
Did you ever find a solution to this? – jannej Mar 14 '16 at 20:57
    
Why is this question still here on serverfault or not closed? – Rob Sep 17 '17 at 21:10

Try backing up all files in /var/lib/mysql somewhere. Delete them all and then execute mysql_install_db.

My problem came from removing mysqld and replacing it with mariadb and trying to keep the database files. All other methods failed for me.

share|improve this answer

Your system has problems running the (post)configure script of the mariadb-server-10.1 package.

First, try to clean the apt cache using apt-get clean and to reinstall the package (please note apt-get autoclean only partially clean the cache).

If that fails, you had to use dpkg -i mariadb-server-10.1 and/or dpkg-reconfigure mariadb-server-10.1 to give a more in-depth looking at the specific error.

share|improve this answer
sudo shutdown -r now

I know it sounds crazy that rebooting the machine solved the problem on linux, but I doublechecked. However I'm working in my Vagrant machine, not sure for Digital Ocean.

System:

  • Debian 7,
  • mysql installed from dotdeb with a working database,
  • updated MariaDB apt sources and key added,
  • install mariadb-server-10.1 which ended with the same error.

After rebooting everything worked, including the DB now served by MariaDB.

share|improve this answer

Found this in log:

[ERROR] /usr/sbin/mysqld: unknown variable log_slow_queries=/var/log/mysql/mysql-slow.log'

So I commented out conf.d/local.cnf

#log_slow_queries=/var/log/mysql/mysql-slow.log'

And installation finally ends succesfully.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.