2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

WSL上のKali Linuxでsudo apt-get updateができない ※

Posted at

環境

  • powershellで下記コマンドを実行してインストールしたもの
    wsl --install --distribution kali-linux
  • Kali Linuxのターミナルで確認(cat /etc/os-release)した内容は下記の通り
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2019.2"
VERSION_ID="2019.2"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"

事象

題名の通り、WSL上のKali Linuxでsudo apt-get updateが失敗する。
コマンドを実行すると、以下のような内容が出力された。

Get:1 http://linux3.yz.yamagata-u.ac.jp/pub/linux/kali kali-rolling InRelease [30.6 kB]
Err:1 http://linux3.yz.yamagata-u.ac.jp/pub/linux/kali kali-rolling InRelease
  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
Fetched 30.6 kB in 1s (48.0 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://linux3.yz.yamagata-u.ac.jp/pub/linux/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.

原因

W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository

で検索をかけたところ、このサイトを発見。

そのサイトでは、以下のような説明がされていた。

The Kali archive keys appear to be missing and cannot be installed using apt-add key
since it relies on GnuPG, which cannot be installed using apt, since the signatures cannot be verified.

アーカイブキーなるものがないので、apt キーを使ってインストールできないみたい?

GnuPGに依存しているため....?よくわからない.... ★要調査★

解決策

上記のサイトを参考に

wget http://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2022.1_all.deb

sudo dpkg -i kali-archive-keyring_2022.1_all.deb

を実行することでsudo apt-get updateが成功するようになった。

※kali-archive-keyring_2022.1_all.debのバージョンは変更されている可能性が高いので注意したい。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?