Unmet dependencies error when installing Kali 2016

8,734

Here's what I've done and it seemed to work.

Re-write sources.list from /etc/apt using the default sources.list file, as specified in the Ubuntu 16.04 documentation.

sudo apt-get update  
sudo apt-get -f install  
sudo apt-get upgrade 

Now I understand that there may be issues when mixing repositories from different Debian distros. I may try to install some Kali default packages one package at a time now, would be harder to mess everything up at once.

Share:
8,734

Related videos on Youtube

Robert S
Author by

Robert S

Updated on September 18, 2022

Comments

  • Robert S
    Robert S almost 2 years

    I have Ubuntu 16.04 with Ubuntu-Gnome3-Desktop/Shell. I immediately performed sudo apt-get upgrade after install, no issues there. Everything worked beautifully until I attempted to install Kali-Linux-2016.1 packages using the Katoolin tool package. Repositories were successfully added, packages were successfully downloaded, but then when I tried sudo apt-get upgrade I ran into some problems as you'll see below in the text taken directly from my terminal

    robert@X17:~$ sudo apt autoremove
    
    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:
     gnupg2 : Depends: gnupg-agent (= 2.1.11-6ubuntu2)
    E: Unmet dependencies. Try using -f.
    
    
    robert@X17:~$ sudo apt-get install gnupg-agent
    
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    gnupg-agent is already the newest version (2.1.11-7).
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     gnupg2 : Depends: gnupg-agent (= 2.1.11-6ubuntu2)
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    
    robert@X17:~$ sudo apt-get -f install
    
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following packages were automatically installed and are no longer required:
      libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal
      libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal
      libkrb5-26-heimdal libroken18-heimdal libwind0-heimdal linux-sound-base
    Use 'sudo apt autoremove' to remove them.
    The following additional packages will be installed:
      gnupg2
    Suggested packages:
      gnupg-doc parcimonie xloadimage
    The following packages will be upgraded:
      gnupg2
    1 upgraded, 0 newly installed, 0 to remove and 969 not upgraded.
    70 not fully installed or removed.
    Need to get 0 B/1,389 kB of archives.
    After this operation, 3,555 kB of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    dpkg: dependency problems prevent processing triggers for gconf2:
     gconf2 depends on python3:any; however:
      Package python3 is not configured yet.
    
    dpkg: error processing package gconf2 (--configure):
     dependency problems - leaving triggers unprocessed
    dpkg: dependency problems prevent processing triggers for gconf2:
     gconf2 depends on python3:any; however:
      Package python3 is not configured yet.
    #^^^ These dpkg errors repeat maybe 50 times, I have edited out most repeats for your sake
     gconf2
     gconf2
    #(This repeats ~50 times)
     gconf2
     gconf2
     gconf2
    Processing was halted because there were too many errors.
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
    robert@X17:~$ sudo apt autoremove
    
    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:
     gnupg2 : Depends: gnupg-agent (= 2.1.11-6ubuntu2)
    E: Unmet dependencies. Try using -f.
    
    robert@X17:~$ sudo apt-get remove python3
    
    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:
     apparmor : Depends: python3:any
     apport : Depends: python3 but it is not going to be installed
     apport-gtk : Depends: python3 but it is not going to be installed
     aptdaemon : Depends: python3 but it is not going to be installed
                 Depends: python3:any (>= 3.2~)
     apturl : Depends: python3:any (>= 3.3.2-2~)
     apturl-common : Depends: python3:any (>= 3.3.2-2~)
    #...... (many depend on python3)
     usb-creator-gtk : Depends: python3:any (>= 3.3.2-2~)
     xdiagnose : Depends: python3:any (>= 3.3.2-2~)
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    
    robert@X17:~$ sudo apt-get autoremove
    
    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:
     gnupg2 : Depends: gnupg-agent (= 2.1.11-6ubuntu2)
    E: Unmet dependencies. Try using -f.
    
    robert@X17:~$ sudo apt-get install python3
    
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    python3 is already the newest version (3.5.1-4).
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     gnupg2 : Depends: gnupg-agent (= 2.1.11-6ubuntu2)
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    
    robert@X17:~$ sudo apt-get -f install
    
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following packages were automatically installed and are no longer required:
      libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal
      libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal
      libkrb5-26-heimdal libroken18-heimdal libwind0-heimdal linux-sound-base
    Use 'sudo apt autoremove' to remove them.
    The following additional packages will be installed:
      gnupg2
    Suggested packages:
      gnupg-doc parcimonie xloadimage
    The following packages will be upgraded:
      gnupg2
    1 upgraded, 0 newly installed, 0 to remove and 969 not upgraded.
    70 not fully installed or removed.
    Need to get 0 B/1,389 kB of archives.
    After this operation, 3,555 kB of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    dpkg: dependency problems prevent processing triggers for gconf2:
     gconf2 depends on python3:any; however:
      Package python3 is not configured yet.
    
    dpkg: error processing package gconf2 (--configure):
     dependency problems - leaving triggers unprocessed
    dpkg: dependency problems prevent processing triggers for gconf2:
     gconf2 depends on python3:any; however:
      Package python3 is not configured yet.
    #^^^ These dpkg errors repeat maybe 50 times, I have edited out most repeats #    for your sake
    dpkg: error processing package gconf2 (--configure):
     dependency problems - leaving triggers unprocessed
    No apport report written because MaxReports is reached already
                                                                  dpkg: 
    
    dpkg: error processing package gconf2 (--configure):
     dependency problems - leaving triggers unprocessed
    No apport report written because MaxReports is reached already
                                                                  dpkg: dependency problems prevent processing triggers for gconf2:
     gconf2 depends on python3:any; however:
      Package python3 is not configured yet.
    
    dpkg: error processing package gconf2 (--configure):
     dependency problems - leaving triggers unprocessed
    No apport report written because MaxReports is reached already
                                                                  dpkg: too many errors, stopping
    Errors were encountered while processing:
     gconf2
     gconf2
    #...
     gconf2
     gconf2
    Processing was halted because there were too many errors.
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
    #Next I tried (with no success) the solution outlined here: http://askubuntu.com/questions/434742/cannot-install-python3-after-dist-upgrade
    
    robert@X17:~$ sudo nano /usr/lib/python3.3/sre_constants.py
    
    robert@X17:~$ sudo nano /usr/lib/python3.5/sre_constants.py
    
    robert@X17:~$ sudo nano /usr/lib/python3.5/sre_parse.py
    
    robert@X17:~$ sudo nano /usr/lib/python3.5/sre_compile.py
    
    Use "fg" to return to nano.
    
    [1]+  Stopped                 sudo nano /usr/lib/python3.5/sre_compile.py
    
    robert@X17:~$ sudo nano /usr/lib/python3.5/sre_compile.py
    
    robert@X17:~$ sudo apt-get -f install
    
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following packages were automatically installed and are no longer required:
      libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal
      libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal
      libkrb5-26-heimdal libroken18-heimdal libwind0-heimdal linux-sound-base
    Use 'sudo apt autoremove' to remove them.
    The following additional packages will be installed:
      gnupg2
    Suggested packages:
      gnupg-doc parcimonie xloadimage
    The following packages will be upgraded:
      gnupg2
    1 upgraded, 0 newly installed, 0 to remove and 969 not upgraded.
    70 not fully installed or removed.
    Need to get 0 B/1,389 kB of archives.
    After this operation, 3,555 kB of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    dpkg: dependency problems prevent processing triggers for gconf2:
     gconf2 depends on python3:any; however:
      Package python3 is not configured yet.
    
    dpkg: error processing package gconf2 (--configure):
     dependency problems - leaving triggers unprocessed
    dpkg: dependency problems prevent processing triggers for gconf2:
     gconf2 depends on python3:any; however:
      Package python3 is not configured yet.
    
    dpkg: error processing package gconf2 (--configure):
     dependency problems - leaving triggers unprocessed
    dpkg: dependency problems prevent processing triggers for gconf2:
     gconf2 depends on python3:any; however:
      Package python3 is not configured yet.
    
    dpkg: error processing package gconf2 (--configure):
     dependency problems - leaving triggers unprocessed
    dpkg: dependency problems prevent processing triggers for gconf2:
     gconf2 depends on python3:any; however:
      Package python3 is not configured yet.
    #^^^ These dpkg errors repeat maybe 50 times, I have editted out most repeats #    for your sake
    
    dpkg: error processing package gconf2 (--configure):
     dependency problems - leaving triggers unprocessed
    No apport report written because MaxReports is reached already
                                                                  dpkg: too many errors, stopping
    Errors were encountered while processing:
     gconf2
    #...
     gconf2
    
    Processing was halted because there were too many errors.
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
    
    robert@X17:~(
    

    What is the problem here and how to fix it?

    • Byte Commander
      Byte Commander almost 8 years
      The moment you started to mess around with removing python3 you severely messed things up I'd say... Anyway, please tell us the output of apt-cache policy gnupg2 gnupg-agent and sudo apt-get update.
    • xangua
      xangua almost 8 years
      Please don't mix repositories, backup any important files you consider and reinstall.
    • Robert S
      Robert S almost 8 years
      Sorry. I can't figure out how to add a picture or code blocks like has been added to my original question. I have the output of the two commands requested. For now I'll just post them directly copy-pasted.
    • Robert S
      Robert S almost 8 years
      robert@X17:~$ sudo apt-cache policy gnupg2 gnupg-agent gnupg2: Installed: 2.1.11-6ubuntu2 Candidate: 2.1.11-7 Version table: 2.1.11-7 500 500 http.kali.org/kali kali-rolling/main amd64 Packages *** 2.1.11-6ubuntu2 500 500 us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 100 /var/lib/dpkg/status gnupg-agent: Installed: 2.1.11-7 Candidate: 2.1.11-7 Version table: *** 2.1.11-7 500 500 http.kali.org/kali kali-rolling/main amd64 Packages 100 /var/lib/dpkg/status 2.1.11-6ubuntu2 500
    • Robert S
      Robert S almost 8 years
      at the end of the sudo apt-get update command, I get: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:55 and /etc/apt/sources.list:57 #this repeats for what seems like every source in the list.