apt-get update が GPG error を出す場合の対処方法

debian

 # apt-get update

とすると以下のような警告がでる場合

 W: GPG error:  xxx 公開鍵を利用できないため、以下の署名は検証できませんでした: xxx xxx
 W: これらの問題を解決するためには apt-get update を実行する必要があるかもしれません

または

 # apt-get install samba

などとして

 警告: 以下のパッケージは認証されていません!
 smbclient smbfs samba samba-common
 検証なしにこれらのパッケージをインストールしますか [y/N]? y

とでる場合は

 # apt-get install debian-keyring
 # apt-get update

で、一度 debian-keyring というパッケージをインストールして、apt-get update すれば良い。