Kali 安装任何软件包时出错

Kali 安装任何软件包时出错

我最近从 parrot 安装了 kali。

安装成功后。我跑

sudo apt-get update
sudo apt upgrade

现在我无法安装任何软件包。它向我显示错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gsettings-desktop-schemas : Breaks: mutter (< 3.31.4) but 3.30.2-7 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

当我尝试运行时sudo apt full-upgrade,另一个错误:

 libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

这是我的/etc/apt/sources.list:

http://http.kali.org/kali kali-last-snapshot main non-free contrib

并且,“apt-cache policy mutter”:

mutter:
  Installed: 3.30.2-7
  Candidate: 3.36.4-1
  Version table:
     3.36.4-1 500
        500 http://http.kali.org/kali kali-rolling/main amd64 Packages
 *** 3.30.2-7 100
        100 /var/lib/dpkg/status

请帮忙。我还需要发布什么额外内容吗?

答案1

我遇到了同样的问题并解决了

  • 即将/var/lib/dpkg/status
  • 清除内容(这些是该文件中的依赖项)
  • 跑步
    apt update && apt install -f
    

在此输入图像描述

答案2

  1. /var/log/apt/term.log在文本编辑器中打开日志文件。

  2. 向下滚动到 term.log 末尾附近的最新日志条目。

  3. 找到所有“损坏”的软件包并使用 删除它们。sudo apt remove package-name

    您可以获得以下列表实际的持有包裹:

    dpkg --get-selections | grep hold
    
  4. 再次尝试运行sudo apt update && sudo apt upgrade

  5. 删除为满足其他包的依赖关系而自动安装的包,但由于依赖关系发生更改或同时删除了需要它们的包,因此不再需要这些包。

    sudo apt autoremove  
    

答案3

sudo apt install gcc-8-base mutter libmpx2 

相关内容