On Ubuntu 16.04 server with a relative default install of LEMP (w/mysql).
When installing using the instructions on the MariaDB site: https://downloads.mariadb.org/mariadb/repositories/#mirror=digitalocean-nyc&distro=Ubuntu&distro_release=xenial--ubuntu_xenial&version=10.1 all steps work except the last when it actually tries to install.
$ sudo apt install mariadb-server Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: mariadb-server : Depends: mariadb-server-10.1 (= 10.1.17+maria-1~xenial) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
I see others with a similar error throughout the years on this site but most have no answer, or the answer was specific to their version.
UPDATE After running command from comments the final installation step worked but after entering a password for root it mentioned an error occurred:
An error occurred while setting the password for the MariaDB administrative user. This may have happened because the account already has a password, or because of a communication problem with the MariaDB server.
You should check the account's password after the package installation.
Please read the /usr/share/doc/mariadb-server-10.1/README.Debian file for more information.
Clicked ok, and it continued to install many packages but then showed errors here:
Installing new version of config file /etc/mysql/debian-start ... 2016-09-27 14:15:23 139954230032640 [Note] /usr/sbin/mysqld (mysqld 10.1.17-MariaDB-1~xenial) starting as process 8339 ... Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. 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.17+maria-1~xenial); however: Package mariadb-server-10.1 is not configured yet. dpkg: error processing package mariadb-server (--configure): dependency problems - leaving unconfigured Processing triggers for libc-bin (2.23-0ubuntu3) ... Processing triggers for systemd (229-4ubuntu8) ... No apport report written because the error message indicates its a followup error from a previous failure. Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing: mariadb-server-10.1 mariadb-server E: Sub-process /usr/bin/dpkg returned an error code (1)