下面的问题如何解决?
$ 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
解决依赖关系问题的最基本的修复方法之一是运行:
sudo apt-get -f install
这里-f
代表“修复损坏的”。 Apt 将尝试纠正损坏的依赖关系。如果您手动安装了具有未满足的依赖项的软件包,apt-get
则将安装这些依赖项(如果可能),否则它可能只是删除您安装的软件包以解决问题。