Answer the question
In order to leave comments, you need to log in
How to resolve MySQL and MariaBD dependency conflict?
On a new project, MariaBD is used, I started installing it carelessly, and only in the process I noticed that the installer demolished MySQL for me. I exited the MairaBD installation.
I think okay, I'll install MariaBD on the docker, and restore MySQL on Ubuntu itself, but ... it wasn't there - it won't let me install MySQL, because MariaBD is supposedly installed.
Team
sudo apt-get -f install
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.21-0ubuntu0.16.04.1_amd64.deb (--unpack):
subprocess new pre-installation script returned error code 1
While processing the following packages encountered errors:
/var/cache/apt/archives/mysql-server-5.7_5.7.21-0ubuntu0.16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get remove mariadb-server
Reading package lists... Done
Building dependency tree
Reading status information... Done The package ' mariadb
-server' is not installed and therefore cannot be removed
You may want to use 'apt-get -f install' to fix these errors:
dependencies:
mysql-server : Depends: mysql-server-5.7 but it will not be installed
E: Unmet dependencies. Try "apt-get -f install" without a package name (or find another solution).
sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
Reading status information... Done
You may want to use "apt-get -f install" to fix these errors:
Packages with unmet dependencies:
mariadb-server : Depends: mariadb-server-10.0 ( >= 10.0.34-0ubuntu0.16.04.1) but it won't install
mysql-server : Depends: mysql-server-5.7 but it won't install
E: Unmet dependencies. Try "apt-get -f install" without a package name (or find another solution).
sudo apt-get --purge remove mariadb
Reading package lists... Done
Building dependency tree
Reading status information... Done
E: Could not find package mariadb
sudo apt-get --purge remove mysql
Reading package lists... Done
Building dependency tree
Reading status information... Done
E: Could not find package mysql
Answer the question
In order to leave comments, you need to log in
Replacing MySQL with MariaDB:
sudo apt remove --purge mysql-server mysql-client mysql-common
sudo apt autoremove
sudo apt install mariadb-server
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question