
私はKali Linuxを使っていて、先日Rコードを実行できるようにaptでいくつかのパッケージをインストールしていました(正確に覚えていれば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 キーリングが表示され続けるのに、私は Debian の Kali を使用していることです。
これが私のソースリストです
# 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 を再び動作させるにはどうすればよいですか?
更新: コメントに記載されているすべてのコマンド (update、upgrade、--fix-broken など) を試しましたが、update を除き、すべてこの投稿の最初に記載したのと同じエラーが発生します。update は「署名が無効です」のような内容で、公開キーについて言及しています。Kali は Debian だと思いますが、なぜ Ubuntu に関することを要求するのかわかりません。
答え1
https://superuser.com/a/1705251
約2年前に尋ねられた質問に対するこの回答は私の問題を解決しました。「2022年の更新」というタイトルの回答
これらの指示に従うと、無効な署名エラーがまだ残っている 1 つのパッケージを除いてすべてが修正されましたが、これは Spotify だけの問題なので、それほど重要ではないと思います。