我升级到了 Ubuntu 17.04,我想添加 y-ppa-manager,但是当我运行命令时
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
我收到以下错误:
gpg: connecting dirmngr at '/tmp/tmp8h5gt_of/S.dirmngr'
failed: IPC
connect call failed
gpg: keyserver receive failed: No dirmngr
Failed to add key.
但我发现我已经有了dirmngr
。我尝试卸载并重新安装它,但没有用。有人能告诉我我做错了什么吗?
答案1
我发现我实际上需要更新我的 gnupg 版本。
我按照此处的说明操作,并成功完成。
步骤如下:
sudo apt-get update
sudo apt-get install libldap2-dev gtk+-2 libbz2-dev
解压最新的 gnupg-2.1.X tarball 并 cd 到新文件夹后,运行以下命令:
sudo make -f build-aux/speedo.mk native INSTALL_PREFIX=/usr/local
sudo ldconfig
下载最新的 pinentry-0.9.5,运行./configure && make && sudo make install.
测试一下: gpg2 --version
之后你可以使用以下命令添加 PPA
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
从以下网址下载 gnupg tarball这里
答案2
备份您现有的目录:$HOME/.gnupg 和 /root/.gnupg 并将其删除。
# dirmngr --debug-level guru
dirmngr[20243.0]: error opening '/root/.gnupg/dirmngr_ldapservers.conf': No such file or directory
dirmngr[20243.0]: permanently loaded certificates: 0
dirmngr[20243.0]: runtime cached certificates: 0
dirmngr[20243.0]: failed to open cache dir file '/root/.gnupg/dirmngr-cache.d/DIR.txt': No such file or directory
dirmngr[20243.0]: creating directory '/root/.gnupg'
dirmngr[20243.0]: creating directory '/root/.gnupg/dirmngr-cache.d'
dirmngr[20243.0]: new cache dir file '/root/.gnupg/dirmngr-cache.d/DIR.txt' created
dirmngr[20243.0]: DBG: chan_3 -> # Home: ~/.gnupg
# Home: ~/.gnupg
dirmngr[20243.0]: DBG: chan_3 -> # Config: [none]
# Config: [none]
dirmngr[20243.0]: DBG: chan_3 -> OK Dirmngr 2.1.0 at your service
OK Dirmngr 2.1.0 at your service