0

I tried to do sudo apt update && sudo apt upgrade on the WSL Kali linux. But I would get this.

sudo apt update
Get:1 http://wlglam.fsmg.org.nz/kali kali-rolling InRelease [30.5 kB]
Err:1 http://wlglam.fsmg.org.nz/kali kali-rolling InRelease
  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
Fetched 30.5 kB in 2s (13.8 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://wlglam.fsmg.org.nz/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.

I have tried this Answer already and it's not working. Specifically

wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

All of the other methods I have tried result in this (with or without sudo)

E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

And If I tried to install gnupg, it would get error 404 not found,

Err:7 http://http.kali.org/kali kali-rolling/main amd64 gnupg-l10n all 2.2.9-1
  404  Not Found [IP: 192.99.200.113 80]
Err:8 http://http.kali.org/kali kali-rolling/main amd64 gnupg-utils amd64 2.2.9-1
  404  Not Found [IP: 192.99.200.113 80]
Err:9 http://http.kali.org/kali kali-rolling/main amd64 libsqlite3-0 amd64 3.24.0-1
  404  Not Found [IP: 192.99.200.113 80]
Err:10 http://http.kali.org/kali kali-rolling/main amd64 gpg amd64 2.2.9-1
  404  Not Found [IP: 192.99.200.113 80]
Err:11 http://http.kali.org/kali kali-rolling/main amd64 gpg-agent amd64 2.2.9-1
  404  Not Found [IP: 192.99.200.113 80]
Err:12 http://http.kali.org/kali kali-rolling/main amd64 gpg-wks-client amd64 2.2.9-1
  404  Not Found [IP: 192.99.200.113 80]
Err:13 http://http.kali.org/kali kali-rolling/main amd64 gpg-wks-server amd64 2.2.9-1
  404  Not Found [IP: 192.99.200.113 80]
Err:14 http://http.kali.org/kali kali-rolling/main amd64 gpgsm amd64 2.2.9-1
  404  Not Found [IP: 192.99.200.113 80]
Err:15 http://http.kali.org/kali kali-rolling/main amd64 gnupg all 2.2.9-1
  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/liba/libassuan/libassuan0_2.5.1-2_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/r/readline/libreadline7_7.0-5_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpgconf_2.2.9-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/libk/libksba/libksba8_1.3.5-2_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/n/npth/libnpth0_1.6-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/dirmngr_2.2.9-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gnupg-l10n_2.2.9-1_all.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gnupg-utils_2.2.9-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/s/sqlite3/libsqlite3-0_3.24.0-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpg_2.2.9-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpg-agent_2.2.9-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpg-wks-client_2.2.9-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpg-wks-server_2.2.9-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpgsm_2.2.9-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gnupg_2.2.9-1_all.deb  404  Not Found [IP: 192.99.200.113 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I couldn't bring the full logs as I can't scroll up due to the cmd.

Kali version = 2018.3

IcyHerrscher
  • 115
  • 2
  • 7
  • 1
    Please bring the logs. Just use the [formatting tools]() to format it as code so the links are not seen as links. We need to see i) the original error message (something more specific than "the invalid signature thing"), ii) the output of the `apt-key add` command, iii) what commands you tried (telling us the error they produced but not telling us what they were isn't helpful). Most importantly: did you really just run `apt-key add` and not `sudo apt-key add`? Or were you running as root? – terdon Jul 27 '21 at 09:29
  • Thank you, I have updated the my question. And Yes I have tried both sudo apt-key add and without it. the only thing that it shows was requiring gnupg. – IcyHerrscher Jul 27 '21 at 09:52
  • Can you manually download and install the GPG package? – C. M. Jul 27 '21 at 17:22
  • 1
    Version **2018.3** ??? You're trying to update a rolling-release distribution that is almost three years out of date. Rolling releases need frequent updates to "keep up with the herd". You could try downloading a `gnupg[2]` package manually and installing it using `dpkg -i *.deb`, and hope that the gnupg packages currently in the archives still run with the old library versions your system has, and then update the `apt` key. But it might be that your system is simply too much behind in updates, and it may no longer be possible to update to the current release level. – telcoM Jul 27 '21 at 18:38
  • I download the wsl2 Kali from the official server, so I don't know how I got some of the most outdated versions of all. Anyway, I have manually downloaded the gpg file but couldn't extract it due to not having bzip2. And downloading bzip2 require commands from apt update (I follow tutorial from google of course). – IcyHerrscher Jul 28 '21 at 06:36
  • @IcyHerrscher When you say that you "downloaded" it, I'm assuming that you are manually installing using [these instructions](https://docs.microsoft.com/en-us/windows/wsl/install-manual)? If so, that would have been critical information to include in the question. Someone else posted a [similar question](https://unix.stackexchange.com/q/666046/432493) today, but they did include that tidbit, so it helped me reproduce and (hopefully) solve the issue. – NotTheDr01ds Aug 24 '21 at 21:12
  • Also a heads-up that (in addition to the workaround posted in the other question), I've submitted an [Issue](https://github.com/MicrosoftDocs/WSL/issues/1264#issue-978502427) on the WSL Docs Github. Sorry you ran into this! – NotTheDr01ds Aug 24 '21 at 21:32
  • 1
    I followed a different instruction/tutorial, but it all amounted to the same steps here, so yes, And sorry, I did not know the info was critical. And thank you for your solution and for contacting me. I have given up on using Kali when this thread went silent. – IcyHerrscher Aug 25 '21 at 14:02
  • @IcyHerrscher No worries, and apologies if the tone comes across harsh from my comment yesterday. I'm just bummed we couldn't figure this out for you a month ago! – NotTheDr01ds Aug 26 '21 at 20:12

1 Answers1

4

update the kali-archive-keyring package

wget http://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2022.1_all.deb && sudo apt install ./kali-archive-keyring*.deb

the file name kali-archive-keyring_*_all.deb may change and you should find the latest one here http://http.kali.org/kali/pool/main/k/kali-archive-keyring/

Time Killer
  • 141
  • 6