Fixing Kali Linux Installation or Update Failures Caused by Invalid Signatures

Apt-Get Install Fails with Err1 & 404 Not Found Error

After firing up an old Kali Linux VM and trying to update a software package, I discovered that Kali Linux would not install any new packages nor would it install the latest Operating System update.

I kept getting an error, Err1, and a HTTP 404 Not Found saying it was failing to fetch the packages or updates.

Below are screenshots of the first error I saw when running apt-get install sshpass.

Apt-Get Update Error

I also got a different error when I tried to run apt-get update. This time the error references an invalid signature.

Fix for Kali Linux Invalid Signature Error

Important Notes:

  1. The invalid signature in the error was ED444FF07D8D0BF6, we’ll only need the last part, 7D8D0BF6 for our command.
  2. The key server reference is one I had found on an article on the internet but apparently there are other key servers you can reference as well.

To fix the Invalid Signature error, we’ll have to enter the following command. As of this writing, this command worked for me if entered verbatim.

EXAMPLE:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $key

WHAT I ACTUALLY RAN:
root@kali:/etc/apt# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7D8D0BF6

Executing: /tmp/apt-key-gpghome.a5zcatYyQB/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7D8D0BF6
gpg: key ED444FF07D8D0BF6: 22 duplicate signatures removed
gpg: key ED444FF07D8D0BF6: 223 signatures not checked due to missing keys
gpg: key ED444FF07D8D0BF6: "Kali Linux Repository <devel@kali.org>" 238 new signatures
gpg: Total number processed: 1
gpg:         new signatures: 238

Video: Kali Linux Signature Error Fix

Other Helpful Kali Linux References

In the steps above I kind of gloss over some technical parts.

One of those topics was Kali Linux repositories. I’m not an expert on it but know it was important part of troubleshooting and solving my problem. Basically knowing enough to know that was not my issue so I could rule it out.

If you have questions about or just want to dive in to the topic of repositories follow the link below. The page addresses items people frequently get wrong as it can be a bit confusing.

https://stackoverflow.com/questions/66217436/error-gpg-keyserver-receive-failed-no-name

https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/