未满足的依赖关系。尝试不使用任何软件包的“apt --fix-broken install”(或指定解决方案)

未满足的依赖关系。尝试不使用任何软件包的“apt --fix-broken install”(或指定解决方案)

运行后apt-get update && apt-get dist-upgrade,似乎我的安装已损坏。

root@l1k:/home/kali# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 default-jdk : Depends: default-jdk-headless (= 2:1.8-59) but it is not installed
               Depends: openjdk-8-jdk
 default-jre : Depends: openjdk-8-jre
               Recommends: default-java-plugin but it is not installed
 default-jre-headless : Depends: openjdk-8-jre-headless
 gir1.2-panelapplet-4.0 : Depends: libpanel-applet-4-0 (>= 3.4.1) but it is not installable
 icedtea-6-jre-cacao : Depends: openjdk-6-jre-headless (= 6b35-1.13.7-1~deb7u1)
 libfarstream-0.1-0 : Depends: gstreamer0.10-plugins-good (>= 0.10.29) but it is not installable
 libpulse-mainloop-glib0 : Depends: libpulse0 (= 11.1-3) but 2.0-6.1 is installed
 libpython2.7 : Depends: libpython2.7-stdlib (= 2.7.14-2) but 2.7.9-2 is installed
 libpython2.7-dev : Depends: libpython2.7-stdlib (= 2.7.14-2) but 2.7.9-2 is installed
 libtagc0 : Depends: libtag1c2a (>= 1.6-2~) but it is not installable
 openjdk-6-jre-lib : Depends: openjdk-6-jre-headless (>= 6b27)
 pulseaudio-utils : Depends: libpulse0 (= 11.1-3) but 2.0-6.1 is installed
                    Depends: libpulsedsp but it is not installed
 python2.7-dev : Depends: python2.7 (= 2.7.14-2) but 2.7.9-2 is installed
 vlc-nox : Depends: libtag1c2a (>= 1.7) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

因此我尝试安装其中一些依赖项,但是:

root@l1k:/home/kali# apt-get purge default-jdk-headless
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'default-jdk-headless' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 default-jdk : Depends: default-jdk-headless (= 2:1.8-59) but it is not going to be installed
               Depends: openjdk-8-jdk
 default-jre : Depends: openjdk-8-jre
               Recommends: default-java-plugin but it is not going to be installed
 default-jre-headless : Depends: openjdk-8-jre-headless
 gir1.2-panelapplet-4.0 : Depends: libpanel-applet-4-0 (>= 3.4.1) but it is not installable
 icedtea-6-jre-cacao : Depends: openjdk-6-jre-headless (= 6b35-1.13.7-1~deb7u1)
 libfarstream-0.1-0 : Depends: gstreamer0.10-plugins-good (>= 0.10.29) but it is not installable
 libpulse-mainloop-glib0 : Depends: libpulse0 (= 11.1-3) but 2.0-6.1 is to be installed
 libpython2.7 : Depends: libpython2.7-stdlib (= 2.7.14-2) but 2.7.9-2 is to be installed
 libpython2.7-dev : Depends: libpython2.7-stdlib (= 2.7.14-2) but 2.7.9-2 is to be installed
 libtagc0 : Depends: libtag1c2a (>= 1.6-2~) but it is not installable
 openjdk-6-jre-lib : Depends: openjdk-6-jre-headless (>= 6b27)
 pulseaudio-utils : Depends: libpulse0 (= 11.1-3) but 2.0-6.1 is to be installed
                    Depends: libpulsedsp but it is not going to be installed
 python2.7-dev : Depends: python2.7 (= 2.7.14-2) but 2.7.9-2 is to be installed
 vlc-nox : Depends: libtag1c2a (>= 1.7) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

甚至无法安装新的软件包:

root@l1k:/home/kali# apt install openjdk-8-jdk-headless
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 default-jdk : Depends: default-jdk-headless (= 2:1.8-59) but it is not going to be installed
               Depends: openjdk-8-jdk
 default-jre : Depends: openjdk-8-jre
               Recommends: default-java-plugin but it is not going to be installed
 default-jre-headless : Depends: openjdk-8-jre-headless
 gir1.2-panelapplet-4.0 : Depends: libpanel-applet-4-0 (>= 3.4.1) but it is not installable
 icedtea-6-jre-cacao : Depends: openjdk-6-jre-headless (= 6b35-1.13.7-1~deb7u1)
 libfarstream-0.1-0 : Depends: gstreamer0.10-plugins-good (>= 0.10.29) but it is not installable
 libpulse-mainloop-glib0 : Depends: libpulse0 (= 11.1-3) but 2.0-6.1 is to be installed
 libpython2.7 : Depends: libpython2.7-stdlib (= 2.7.14-2) but 2.7.9-2 is to be installed
 libpython2.7-dev : Depends: libpython2.7-stdlib (= 2.7.14-2) but 2.7.9-2 is to be installed
 libtagc0 : Depends: libtag1c2a (>= 1.6-2~) but it is not installable
 openjdk-6-jre-lib : Depends: openjdk-6-jre-headless (>= 6b27)
 openjdk-8-jdk-headless : Depends: openjdk-8-jre-headless (= 8u151-b12-1)
 pulseaudio-utils : Depends: libpulse0 (= 11.1-3) but 2.0-6.1 is to be installed
                    Depends: libpulsedsp but it is not going to be installed
 python2.7-dev : Depends: python2.7 (= 2.7.14-2) but 2.7.9-2 is to be installed
 vlc-nox : Depends: libtag1c2a (>= 1.7) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

如何修复这个错误?

答案1

我有这个问题,我解决了

sudo apt-get -f install

我希望能解决你的问题

答案2

这三种情况的答案都包含在每个输出的最后一行:

apt --fix-broken install

简而言之,您的安装的某些部分已损坏,或者损坏apt,并运行上述命令将尝试纠正此问题。在运行此命令之前,您可能无法使用 来安装任何东西。

正如 gdoumenc 所说他们的评论,你也可以运行

apt-get --fix-broken install

apt仅仅是一个前端apt-get,来自手册apt

DIFFERENCES TO APT-GET(8)
   The apt command is meant to be pleasant for end users and does not need
   to be backward compatible like apt-get(8). 

apt 和 apt-get 有什么区别?

相关内容