(Solved) (Fixed )MariaDB Unmet Dependencies on Ubuntu 20.04.

Error or Issue : Unmet Dependencies: 

# 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.3 (>= 1:10.3.25-0ubuntu0.20.04.1) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

Solution or Fix :

Remove the different version of MySQL/MariaDB. To check the version run the following command.

dpkg -l | grep -E 'mysql|mariadb'

output: 

ii  libdatetime-format-mysql-perl          0.06-1                            all          module to parse and format MySQL dates and times

ii  libdbd-mysql-perl:amd64                4.050-3                           amd64        Perl5 database interface to the MariaDB/MySQL database

ii  libmysqlclient21:amd64                 8.0.22-0ubuntu0.20.04.3           amd64        MySQL database client library

ii  mysql-client                           8.0.22-0ubuntu0.20.04.3           all          MySQL database client (metapackage depending on the latest version)

ii  mysql-client-8.0                       8.0.22-0ubuntu0.20.04.3           amd64        MySQL database client binaries

ii  mysql-client-core-8.0                  8.0.22-0ubuntu0.20.04.3           amd64        MySQL database core client binaries

ii  mysql-common                           5.8+1.0.5ubuntu2                  all          MySQL database common files, e.g. /etc/mysql/my.cnf


The issue is because of the two different version of Mariadb, mysql-common installed. So run the following command: 

#apt purge mysql-common

If it doesn't work, remove the mysql directory:

# cp -r /etc/mysql /var/lib/mysql ~/
# rm -rf  /etc/mysql /var/lib/mysql


Comments

  1. I have followed the instructions and the problem I had was able to solve it.
    Thank you.

    ReplyDelete

Post a Comment

Popular posts from this blog

Solution to Moodle Error: Coding error detected, it must be fixed by a programmer: Failed to unserialise data from file. Either failed to read, or failed to write.

ACTION_FAILED:OU_INVALID: Solution for GoogleApps bulk user upload issue, username@domainname.com:ACTION_FAILED:OU_INVALID. This error is because you have not specified the Org Unit Path properly.