Debain apt 缺少 Ubuntu 密钥环?

Debain apt 缺少 Ubuntu 密钥环?

我使用的是 Kali Linux,前几天我用 apt 安装了一些软件包,以便可以运行 R 代码(如果我没记错的话,我安装了 r-base),从那时起我的 apt 就一直出问题。现在每当我尝试安装任何软件包时,我都会得到这个

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 apt : Depends: ubuntu-keyring but it is not installable
 apt-utils : Depends: apt (= 2.2.3) but 2.0.2ubuntu0.2 is to be installed
 r-cran-mgcv : Depends: r-cran-nlme (>= 3.1-64) but it is not going to be installed
 r-recommended : Depends: r-cran-nlme (>= 3.1.52) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我尝试过 --fix-broken 和 --fix-missing 我也尝试过手动安装缺失的东西,比如 r-cran-nlme,它给了我这个

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 apt : Depends: ubuntu-keyring but it is not installable
 apt-utils : Depends: apt (= 2.2.3) but 2.0.2ubuntu0.2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

每当我尝试获取另一个包(如 mit-scheme)时,它都会再次返回第一个错误消息。我觉得特别奇怪的是,它一直说 ubuntu keyring,但我使用的是 Kali,它是 Debian。

这是我的来源列表

# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free

# Additional line for source packages
deb-src http://http.kali.org/kali kali-rolling main contrib non-free

我怎样才能修复这些错误并使 apt 再次工作?

更新:我尝试了评论中提到的所有命令(更新、升级、--fix-broken 等),它们都给出了我在这篇文章中首先列出的相同错误,除了更新,它说的是“签名无效”之类的话,并提到了公钥。我相信 Kali 是 Debian,所以我不确定它为什么要求 ubuntu 的东西?

答案1

https://superuser.com/a/1705251

大约 2 年前提出的一个问题的答案解决了我的问题。标题为“2022 年更新”的答案

按照这些说明,现在所有问题都已修复,除了一个包仍然有无效签名错误,但那只是 spotify,所以我想这不是太重要。

相关内容