-2

im currently installing mariadb in ubuntu server and when i got to the end of the installation process it throws me an error, that goes like this = "the following packages have unfulfilled dependecies" : mariadb-server : depends of : mariadb-server-10.3 (>= 1:10.3.38-0ubuntu0.20.04.1) by the following it wouldnt be installed.

The problems could not be corrected, you have had broken packages

  • 1
  • 1
    Welcome. Please copy and past text exactly into your question - in code blocks. Semi-inaccurate reproduction of error messages will not really help. Also, please state your Ubuntu version, and also how you installed MariaDB in the first place. All this is to help identify the problem. – Artur Meinild Nov 14 '23 at 12:26
  • Ok my ubuntu server is in spanish language so i got to translate the error, and it goes like this: 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 necessary packages have not yet been created or have been moved out of "Incoming".

    The following information may help resolve the situation:

    The following packages have unfulfilled dependencies:

    mariadb-server : Depends : mariadb-server 10.3 (>= 1:10.3.38-0ubuntu0.20.04.1)

    – Santiago Gutierrez Mosquera Nov 14 '23 at 12:28
  • https://packages.ubuntu.com/focal-updates/mariadb-server-10.3 is available, but you've not provided your release details so we can only guess. Do you have universe enabled, as that is where the package is provided (ie. return to basics with sudo apt update or your sources; any warnings/errors for your unstated release; any missing lines etc) – guiverc Nov 14 '23 at 12:29
  • 1
    by the way, my ubuntu is Ubuntu 20.04.6 LTS – Santiago Gutierrez Mosquera Nov 14 '23 at 12:37

1 Answers1

0

One of the most common reason why this happens is when you have some MySQL packages installed on your system. MariaDB is a drop-in replacement for MySQL and both use the same library names and files (both in /var/lib/mysql and /etc/mysql/my.conf). Check this post: Why does Ubuntu prohibit installing both MySQL and MariaDB via apt? for more details. You can do some clean up and try to install it again.

Use apt list --installed | grep mysql and look for mysql-server, mysql-client-8.0 and other similar packages.

If you want to install MariaDB, you will have to uninstall these. You can remove them manually one by one or use apt with wildcard(*) like this:

sudo apt remove mysql*
sudo apt autoremove
sotirov
  • 3,169