Here are the steps
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
$ sudo add-apt-repository 'deb [arch=amd64,i386] http://mirror.fibergrid.in/mariadbrepo/10.1/ubuntu xenial main'
sudo apt-get update
sudo apt-get install mariadb-server
Error
sudo: /etc/sudoers.d is world writable
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.14+maria-1~trusty) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get remove --purge mariadb-server
& then try to installsudo: /etc/sudoers.d is world writable
is the error in your case, the directory is world writable ? if yes, correct this first.