使用ubuntu源時出現 GPG error

在/etc/apt/source.list新增加了某源 deb http://ppa.launchpad.net/...

sudo aptitude update 時出現錯誤:


... ...

Hit http://archive.ubuntu.com lucid-security/multiverse Packages

Fetched 63.5kB in 4s (15.8kB/s)  

Reading package lists... Done  

W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FAF69C646FF368B7  


錯誤是由于未給新添加的源設置gpg key,網上搜到如下命令。

解決方法:


sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com FAF69C646FF368B7


其中最後的數字,即上面出現error的 public key.

然後再運行 aptitude update,一切正常。



作者: davhuang   发布时间: 2010-10-09