1

How to solve the issue below?

$ sudo apt-get purge
[sudo] password for massa: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libmariadbclient18 : Depends: libmysqlclient18 (= 10.0.28+maria-1~xenial) but it is not installed
 libstdc++-5-dev : Depends: libstdc++6 (>= 5.4.0-6ubuntu1~16.04.4) but 5.4.0-6ubuntu1~16.04.2 is installed
 libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.2) but 5.4.0-6ubuntu1~16.04.4 is installed
 libstdc++6:i386 : Depends: gcc-5-base:i386 (= 5.4.0-6ubuntu1~16.04.2) but 5.4.0-6ubuntu1~16.04.4 is installed
 mariadb-server-10.0 : Depends: mariadb-client-10.0 (>= 10.0.28+maria-1~xenial) but 10.0.27-0ubuntu0.16.04.1 is installed
E: Unmet dependencies. Try using -f.
1
  • Please edit your question and give us some context. First, what operating system are you using? Second, what are you trying to do? Do you want to install mariadb? Do you want to install mysql? Are you trying to have both installed in parallel? Are you trying to remove one of the two?
    – terdon
    Aug 1, 2021 at 20:14

1 Answer 1

0

One of the most basic fixes to resolve dependencies problems is to run:

sudo apt-get -f install

The -f here stands for “fix broken”. Apt will attempt to correct broken dependencies. If you manually installed a package that had unmet dependencies, apt-get will install those dependencies, if possible, otherwise it may simply remove the package that you installed in order to resolve the problem.

4
  • Hi Wissam, I have tried that an got the conflict message: mariadb-client-10.0 conflicts with mysql-client-core-5.5
    – user74721
    Dec 8, 2016 at 9:40
  • take a look here serverfault.com/questions/702852/… Dec 8, 2016 at 9:42
  • Hi Wissam, did the following : sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5 sudo rm -rf /etc/mysql /var/lib/mysql sudo apt-get autoremove sudo apt-get autoclean
    – user74721
    Dec 15, 2016 at 2:02
  • but still cannot install mariadb.
    – user74721
    Dec 15, 2016 at 2:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .