Solved: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY

Recently, I faced this error when i update the all application in my Raspberry Pi using:

sudo apt-get upgrade

and the error was:

W: http://deb.debian.org/debian/dists/bullseye-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/influxdb.gpg are ignored as the file has an unsupported filetype.
W: GPG error: https://repos.influxdata.com/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8FF8E1F7DF8B07E

To resolve the issue, I tried the following steps:

  1. Import the InfluxDB repository public key:
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
  1. Add the InfluxDB repository to the list of trusted repositories:
echo "deb https://repos.influxdata.com/debian bullseye stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
  1. Update the package list:
sudo apt-get update

However, I received the same problem but I could solve this issue using the following steps:

  1. Remove the existing keyring file:
sudo rm /etc/apt/trusted.gpg.d/influxdb.gpg
  1. Download a new keyring file using the wget command:
wget https://repos.influxdata.com/influxdb.key
  1. Import the new keyring file into the trusted.gpg.d directory:
sudo mv influxdb.key /etc/apt/trusted.gpg.d/
  1. Update the package list:
sudo apt-get update

I hope this solution solves your problem as well.

Leave a Comment

Your email address will not be published. Required fields are marked *