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
答案1
我遇到了同样的问题Ubuntu 18.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应该能够从艾尔帕没有任何错误信息:
M-x package-refresh-contents RET