每当我运行M-x package-refresh-contents或M-x package-list-packages时,我都会得到这个错误,这与Emacs键环更新有关:
Failed to verify signature archive-contents.sig:
No public key for 066DAFCB81E42C40 created at 2020-12-16T17:05:02-0500 using RSA
Command output:
gpg: Signature made Wed 16 Dec 2020 05:05:02 PM EST
gpg: using RSA key C433554766D3DDC64221BFAA066DAFCB81E42C40
gpg: Can't check signature: No public key我正试图按照http://elpa.gnu.org/packages/gnu-elpa-keyring-update.html的步骤手动更新ELPA键环。我不能使用M-x package-install RET gnu-elpa-keyring-update RET来安装这个包(当我发出命令时,它写的是[No match] )。
在同一页中,列出了三种手动修复此问题的不同方法。我试过前两种,但都不起作用。
$ gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40
gpg: keyserver receive failed: General error$ gpg --homedir ~/.emacs.d/elpa/gnupg --quick-set-expire 474F05837FBDEF9B 1y
gpg: "474F05837FBDEF9B" is not a fingerprint现在,我如何尝试第三种方法(暂时禁用签名验证)?
一些系统细节:
$ emacs --version
GNU Emacs 25.2.2
Copyright (C) 2017 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.$ uname -a
Linux jetson 4.9.140-tegra #1 SMP PREEMPT Tue Oct 27 21:02:37 PDT 2020 aarch64 aarch64 aarch64 GNU/Linux$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic发布于 2020-12-22 16:19:15
我在Ubuntu18.04(仿生)上也有过同样的问题。
关于https://emacs.stackexchange.com/questions/60554/cannot-run-melpa-package-refresh-due-to-gpg-errors的说明为我解决了这个问题:
用以下行在gpg.conf中生成一个名为~/.emacs.d/elpa/gnupg/的文件:
keyserver hkp://keys.gnupg.net然后,运行以下命令:
gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40现在,Emacs应该能够从Elpa获得数据,而不会出现任何错误消息:
M-x package-refresh-contents REThttps://askubuntu.com/questions/1300724
复制相似问题