解决W: GPG error: http://security.debian.org squeeze/updates Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY

如果你在用apt-get update升级的时候遇到这几个问题时候, 如下有几种解决办法.

情况1:
"W: GPG error: http://security.debian.org squeeze/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA"

1. 检查所有库里的key.

$apt-key list

2. 安装debian-archive-keyring.

$apt-get install debian-archive-keyring

#应该能看到例如如下的提示:
pub 4096R/B98321F9 2010-08-07 [expires: 2017-08-05]
uid Squeeze Stable Release Key

pub 1024D/F42584E6 2008-04-06 [expires: 2012-05-15]
uid Lenny Stable Release Key

pub 4096R/55BE302B 2009-01-27 [expires: 2012-12-31]
uid Debian Archive Automatic Signing Key (5.0/lenny)

pub 2048R/6D849617 2009-01-24 [expires: 2013-01-23]
uid Debian-Volatile Archive Automatic Signing Key (5.0/lenny)

pub 4096R/473041FA 2010-08-27 [expires: 2018-03-05]
uid Debian Archive Automatic Signing Key (6.0/squeeze)

3. 升级你的Debian.

$apt-get update

情况2:
如果遇到如下问题.
"W: GPG error: http://www.debian-multimedia.org testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907"

解决:

$apt-get install debian-multimedia-keyring

3. 运行更新

$apt-get update

如果还是不行尝试"

rm /var/lib/apt/lists/* -vf
apt-get clean
apt-get update

情况3:

W: GPG error: ftp://ftp.deb-multimedia.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907
W: GPG error: ftp://ftp.deb-multimedia.org squeeze-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907

解决:

在/etc/apt/sources.list 文件中插入

deb ftp://ftp.deb-multimedia.org squeeze main non-free
deb ftp://ftp.deb-multimedia.org squeeze-backports main

#添加 Key

apt-get install debian-keyring
gpg --keyring /usr/share/keyrings/debian-keyring.gpg -a --export 07DC563D1F41B907 |apt-key add -

情况4:
"W: GPG error: http://nginx.org squeeze Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62"

解决:
在/etc/apt/sources.list 里插入
deb http://packages.dotdeb.org stable all

#添加Key

gpg --keyserver keyserver.ubuntu.com --recv-key ABF5BD827BD9BF62
gpg -a --export ABF5BD827BD9BF62 | apt-key add -
apt-get update

情况5:

W: GPG error: http://packages.dotdeb.org stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E9C74FEEA2098A6E

解决:
在/etc/apt/sources.list 里插入

deb http://packages.dotdeb.org stable all

#添加Key

wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | apt-key add -
rm dotdeb.gpg
分享到:

make a comment

(opt)