安装 Kali 2016 时出现未满足依赖项错误

安装 Kali 2016 时出现未满足依赖项错误

我有 Ubuntu 16.04,带有 Ubuntu-Gnome3-Desktop/Shell。sudo apt-get upgrade安装后我立即执行,没有问题。一切都很顺利,直到我尝试使用 Katoolin 工具包安装 Kali-Linux-2016.1 包。成功添加了存储库,成功下载了包,但当我尝试时,sudo apt-get upgrade我遇到了一些问题,正如您将在下面直接从我的终端中看到的文本中看到的那样

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:~(

这里的问题是什么以及如何解决?

答案1

这是我所做的并且似乎有效。

sources.list使用/etc/apt默认文件重写sources.list,如 Ubuntu 16.04 文档中所述。

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

现在我明白了,混合使用不同 Debian 发行版的存储库可能会出现问题。我现在可能会尝试一次安装一个 Kali 默认软件包,这样很难一下子把所有东西都弄乱。

相关内容