14Room

みんな泣きながらオトナになったんだ。

apt-get updateでAn error occurred during the signature verificationが出たときの対処法

久しぶりに apt-get update しようとしたところ、

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.treasuredata.com trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 901F9177AB97ACBE

W: Failed to fetch http://packages.treasuredata.com/2/ubuntu/trusty/dists/trusty/InRelease

W: Some index files failed to download. They have been ignored, or old ones used instead.

なんてメッセージが表示されました。 どうもtreasuredataのsha1で作られたGPG keyが廃止になったのが原因で、古いGPG keyを使ってるとerrorになるようです。 なので下記の手順で古いのを消して、新しいのを入れましょう。

% apt-key del A12E206F
% curl -O https://packages.treasuredata.com/GPG-KEY-td-agent
% apt-key add GPG-KEY-td-agent