这是一个疯狂的 Ubuntu 安装的故事。
有一天,在安装、受到喜爱并向其他操作系统展示谁是老大之后,它决定删除许多存储的签名/公钥——全部是它自己做的!
Ubuntu 安装处理得很好,但用户在尝试时发现很难解决问题apt-get update
。
如果可以在没有验证的情况下进行更新,用户决定尝试一下(承认风险)并且......他们都知道这是无法继续下去的。
所以 - 对于所有其他 Ubuntu 用户来说,都属于互联网!
暂时打破叙述者角色
我最后一次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 ://gb.archive.ubuntu.com maverick Release:
The following signatures were invalid:
BADSIG 40976EAF437D05B5
Ubuntu Archive Automatic Signing Key <[email protected]>
W: GPG error: http ://ppa.launchpad.net maverick Release:
The following signatures couldn't be verified because the public key is not available:
NO_PUBKEY 61E091672E206FF0
W: An error occurred during the signature verification.
The repository is not updated and the previous index files will be used.
GPG error: http ://ppa.launchpad.net maverick Release:
The following signatures were invalid:
BADSIG 9DAD42D740C11E40
Launchpad Cloudsn Reporitory
W: An error occurred during the signature verification.
The repository is not updated and the previous index files will be used.
GPG error: http ://ppa.launchpad.net maverick Release:
The following signatures were invalid:
BADSIG B725097B3ACC3965
Launchpad lffl
W: GPG error: http ://ppa.launchpad.net maverick Release:
The following signatures couldn't be verified because the public key is not available:
NO_PUBKEY 6D3B959722E58263
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/maverick/Release
W: Failed to fetch http://ppa.launchpad.net/chuchiperriman/cloudsn/ubuntu/dists/maverick/Release
W: Failed to fetch http://ppa.launchpad.net/ferramroberto/vlc/ubuntu/dists/maverick/Release
W: Failed to fetch http://nightlies.videolan.org/build/intrepid-i386/arch/./Packages.gz
404 Not Found
W: Failed to fetch http://ppa.launchpad.net/nilarimongard/webupd8/ubuntu/dists/maverick/main/source/Sources.gz
404 Not Found
W: Failed to fetch http://ppa.launchpad.net/nilarimongard/webupd8/ubuntu/dists/maverick/main/binary-i386/Packages.gz
404 Not Found
W: Some index files failed to download, they have been ignored, or old ones used instead.
我在 Ubuntu 论坛上看到,我可以逐个检查每个丢失的签名/密钥并将其找回。这似乎是一个相当冗长的解决方案。
是否有一行代码可以自动查找所有丢失的密钥?还是我注定要手动查找这些密钥才能获得幸福?
答案1
Launchpad-Getkeys(一个包含在 .deb 中的小脚本,可轻松安装)会自动导入所有缺失的 GPG 密钥。
要安装和使用它,请打开终端并复制/粘贴以下命令:
cd ~/Downloads
wget https://launchpad.net/~nilarimogard/+archive/webupd8/+files/launchpad-getkeys_0.3.1-1%7Ewebupd8%7Emaverick3_all.deb
sudo dpkg -i launchpad-getkeys*.deb
sudo launchpad-getkeys
上面的第一个命令将目录更改为您的下载文件夹,第二个命令下载 .deb,第三个命令安装 .deb,最后一个命令运行“launchpad-getkeys”脚本,该脚本自动导入所有缺失的 GPG 密钥。
如果您使用代理,则需要更改一些内容,因此如果您也需要相关信息,请告诉我。
顺便说一句,我发现您还遇到了其他一些错误,而不仅仅是 GPG 密钥。看起来您的一些 PPA .list 文件已损坏(例如,我看到您遇到了 WebUpd8 PPA 的 404 未找到错误,这不可能,因为 PPA 从 Jaunty 一直存在到 Natty - 也许您的互联网连接中断了?)。