Ubuntu 18.04添加GPG密钥失败,出现“找不到gpg-agent”错误。

26
尝试将基础镜像迁移到稳定的Ubuntu 18.04,当我们尝试添加gpg密钥时,出现以下错误:
root@77ff14f29cab:/# apt-key add apt-key.gpg 
gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory
gpg: can't connect to the agent: No such file or directory
gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory
gpg: can't connect to the agent: No such file or directory
1个回答

60

您缺少 gpg-agent 包,最有可能的是:

gpg-agent/testing,unstable,now 2.2.5-1 amd64 [installed,automatic]
  GNU privacy guard - cryptographic agent

你应该运行的命令是:
apt install gpg-agent

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接