0

MariaDB 10.0 does not install properly when using Vagrant, Docker and other virtualised services.

$ DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-galera-server
Setting up mariadb-galera-server-10.0 (10.0.14+maria-1~trusty) ...
invoke-rc.d: policy-rc.d denied execution of stop.
dpkg: error processing package mariadb-galera-server-10.0 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-galera-server:
 mariadb-galera-server depends on mariadb-galera-server-10.0 (= 10.0.14+maria-1~trusty); however:
  Package mariadb-galera-server-10.0 is not configured yet.

dpkg: error processing package mariadb-galera-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-0ubuntu6.3) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 mariadb-galera-server-10.0
 mariadb-galera-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
SleepyCal
  • 113
  • 6

1 Answers1

1

tldr; The minimum required RAM for MariaDB 10.0 to install is 1GB when combined with Docker and other tooling.

After several hours of debugging, the problem was due to lack of RAM.

This was found by adding “set -x” at the top of "/var/lib/dpkg/info/mariadb-galera-server-10.0.postinst”, then re-ran apt-get install -f. I then found the command which was last shown from “set -x” output, and removed the "2>&1 | $ERR_LOGGER” from the end of the line. The debug output that resulted was;

141104 22:48:23 [Note] InnoDB: Initializing buffer pool, size = 256.0M
InnoDB: mmap(274726912 bytes) failed; errno 12
141104 22:48:23 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
141104 22:48:23 [ERROR] Aborting
SleepyCal
  • 113
  • 6