
表示されるエラー メッセージは次のとおりです。
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
sudo の場合:
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