這是我遇到的錯誤訊息:
An error occurred during the signature verification. The repository is not updated and the previous index files will be used.
GPG error: https://apt.releases.hashicorp.com focal
InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA16FCBCA621E701.
然後我運行了這個:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys AA16FCBCA621E701
sudo apt-key list
只是為了確保密鑰已導入並且已導入。但當我運行時我仍然收到相同的錯誤訊息sudo apt-get update
答案1
在須藤下:
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor > /usr/share/keyrings/hashicorp-archive-keyring.gpg
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/hashicorp.list
apt update