sudo apt-get update를 실행하면 "서명 확인 중에 오류가 발생했습니다"라는 메시지가 나타납니다.

sudo apt-get update를 실행하면 "서명 확인 중에 오류가 발생했습니다"라는 메시지가 나타납니다.

내가 겪는 오류 메시지는 다음과 같습니다.

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

관련 정보