This error occurs when the public key required to verify the signature of the repository is missing on your system. To resolve this issue and update your WSL distro, you can follow these steps:
-
Identify the missing public key. In your case, the error message states that the public key “AA16FCBCA621E701” is not available.
-
To add the missing public key, use the
apt-keycommand followed by theadvoption and the key ID. Run the following command, replacing<KEY_ID>with the actual key ID mentioned in the error message:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <KEY_ID>
In your case, the command would be:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA16FCBCA621E701
This command retrieves the missing public key from the keyserver and adds it to your system.
- After adding the key, you can update the package lists and upgrade the packages as mentioned in the previous response:
sudo apt update
sudo apt upgrade
This should resolve the signature verification error and allow you to update your WSL distro successfully.
If you encounter similar errors for other missing public keys in the future, you can repeat the steps mentioned above, replacing the <KEY_ID> placeholder with the actual key ID provided in the error message.