无法在 Kali Linux 上安装任何东西

无法在 Kali Linux 上安装任何东西

每当我尝试在 Kali Linux 上安装任何东西时,我都会遇到同样的错误。例如运行sudo apt-get -f install alien输出:

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:
 alien : Depends: debhelper (>= 7) but it is not going to be installed
         Depends: rpm (>= 2.4.4-2) but it is not going to be installed
         Depends: rpm2cpio but it is not going to be installed
 tcpdump : Depends: libpcap0.8 (>= 1.5.1) but 1.4.0-2 is to be installed
 tshark : Depends: libpcap0.8 (>= 1.5.1) but 1.4.0-2 is to be installed
 wireshark-common : Depends: libpcap0.8 (>= 1.5.1) but 1.4.0-2 is to be installed
 wireshark-qt : Depends: libpcap0.8 (>= 1.5.1) but 1.4.0-2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

答案1

尝试按照输出所示操作。不要sudo apt-get -f install alien只运行 alien 包类型来修复问题:

sudo apt-get -f install  

(无包裹)

从输出man apt-get

-f, --fix-broken  
    修复;尝试纠正存在破坏依赖关系的系统。
    此选项与 install/remove 一起使用时,可以省略任何包  
    以允许 APT 推断出可能的解决方案。

相关内容