2

After running apt-get update && apt-get dist-upgrade, it seems my install is broken.

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).

So I tried installing some of these dependencies but:

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).

Even installing new packages is not possible:

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).

How to fix this error?

Greenonline
  • 2,081
Imme22009
  • 131
  • 1
  • 1
  • 4
  • 1
    I need to be rude here but you haven't even looked at the error message or ever done a quick search on the Internet. To resolve this issue do exactly what it tells you to try.

    apt --fix-broken install

    – Cipher Menial Jul 01 '19 at 00:05
  • 1
    In fact you should enter apt-get --fix-broken install (not smiply apt..) – gdoumenc Dec 29 '19 at 08:50
  • What version of Ubuntu? – Organic Marble Mar 06 '21 at 23:38
  • 1
    @OrganicMarble Please cv because according to the root@l1k:/home/kali# terminal prompt Imme22009 is using Kali Linux and this question is not about Ubuntu. – karel Feb 22 '22 at 01:01

2 Answers2

3

I have this problem and I solved with

sudo apt-get -f install

I hope to solve your problem

2

The answer to each of the three scenarios is contained in the last line of each output:

apt --fix-broken install

In short, some part of your installation is broken, or corrupted, and running the above command will attempt to rectify this issue. You will, probably, be unable to install anything, using apt, until you run this command.

As gdoumenc states in their comment, you could also run

apt-get --fix-broken install

apt is merely a front end for apt-get, from the apt man page:

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). 

See What is the difference between apt and apt-get?

Greenonline
  • 2,081