If you’re on Arch Linux, EndeavourOS, or Manjaro and you’ve seen this annoying error:
error: required key missing from keyring
you’re not alone. This happens when your system tries to verify a package’s signature, but the GPG key it needs isn’t in your keyring. Here’s how to fix it, fast.
🔧 Step-by-Step Fix
1. Update Your Keyring
First, try the most straightforward fix. Update the keyrings:
sudo pacman -Sy archlinux-keyring
If you’re on Manjaro or EndeavourOS, you can also update their keyrings:
# For Manjaro
sudo pacman -Sy manjaro-keyring
# For EndeavourOS
sudo pacman -Sy endeavouros-keyring
Then update your system:
sudo pacman -Syu
2. Manually Refresh the Keyring
If that doesn’t work, you can refresh and populate the keyring manually:
sudo pacman-key --init
sudo pacman-key --populate archlinux
Also add:
# Optional: populate Manjaro or EndeavourOS keyring if needed
sudo pacman-key --populate manjaro
sudo pacman-key --populate endeavouros
3. Trust a Specific Key (if needed)
Sometimes a specific package throws the error because it needs a particular key. Find the key in the error message, then:
# Replace KEYID with the actual key
sudo pacman-key --recv-keys KEYID
sudo pacman-key --lsign-key KEYID
This tells pacman to trust the key.
4. Clear and Reinstall the Package (if the above fails)
In rare cases, you might need to clear the package cache and redownload:
sudo pacman -Syyu
Or remove and reinstall the package:
sudo pacman -Rns [package-name]
sudo pacman -S [package-name]
✅ Final Notes
- Stay updated: Keeping your keyrings and system updated helps avoid this error.
- Don’t ignore it: Skipping signature checks with
--nosignature
is risky. It’s better to fix the key issue properly. - Still stuck? Try clearing the keyring completely and starting fresh:
sudo rm -r /etc/pacman.d/gnupg
sudo pacman-key --init
sudo pacman-key --populate archlinux manjaro endeavouros
Got questions or run into issues? Drop them in the comments—I’ll help you troubleshoot.
Leave a Reply