As it shows in the title of this article, the main purpose of this article is to show how to solve an error. The error happens in the process of MariaDB Database Server installation. The process for installing MariaDB Database Server occurs in Linux Ubuntu 18.04. The following is the first step for the installation. Search the package first to check whether it exists on the available repository or not. Type and execute the following command :
root@hostname:~$ apt search mariadb-server Sorting... Done Full Text Search... Done mariadb-server/bionic-updates,bionic-security 1:10.1.40-0ubuntu0.18.04.1 all MariaDB database server (metapackage depending on the latest version) mariadb-server-10.1/bionic-updates,bionic-security,now 1:10.1.40-0ubuntu0.18.04.1 amd64 [installed] MariaDB database server binaries in mariadb-server-core-10.1/bionic-updates,bionic-security,now 1:10.1.40-0ubuntu0.18.04.1 amd64 [installed,automatic] MariaDB database core server files root@hostname:~$
The above command is to search whether it exist in the available repository or not. If it exist, just execute the following command to check if it is already available from the previous installation in the operating system or not :
apt list --installed | grep package_name
Change or modify the above command by replacing package_name with ‘mariadb-server’ as the following command execution :
root@hostname:~$ apt list --installed | grep mariadb-server WARNING: apt does not have a stable CLI interface. Use with caution in scripts. mariadb-server-10.1/bionic-updates,bionic-security,now 1:10.1.40-0ubuntu0.18.04.1 amd64 [installed] mariadb-server-core-10.1/bionic-updates,bionic-security,now 1:10.1.40-0ubuntu0.18.04.1 amd64 [installed,automatic] root@hostname:~$
If the output of the above command execution appears, then the problem is not in the installation package. On the contrary, there is a chance for further installation and it ends with a certain problem. It shows in a different output as follow :
root@hostname:~$ apt list --installed | grep mariadb-server WARNING: apt does not have a stable CLI interface. Use with caution in scripts. root@hostname:~$
Execute the installation process as follows :
root@hostname:~$ apt-get -y 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 (>= 1:10.1.40-0ubuntu0.18.04.1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. root@hostname:~$
There is an error in the above output installation execution. The error message is ‘ mariadb-server : Depends: mariadb-server-10.1 (>= 1:10.1.40-0ubuntu0.18.04.1) but it is not going to be installed’. Instead of continuing the installation with the same package name, the continue proceed on with a different package name. The installation continue with the package with the name of ‘mariadb-server-10.1’. To view all the complete process of the installation of ‘mariadb-server-10.1’, just access the article with the title of ‘How to Install MariaDB Database Server in Linux Ubuntu 18.04’ in this link.