GPG不工作

GPG不工作

我正在使用 Ubuntu 18.04.1。
我之前已从 gnupg.org 手动安装了 GPG 2.1.15(包括依赖项)。
我想安装一个 ppa,运行后sudo apt-key add Release.key我得到了输出:

gpg: can't connect to the agent: IPC connect call failed 

然后我开始徒劳地寻找解决方案。但结果并不理想。我卸载了 GPG2(及其依赖项),并使用sudo make uninstallGPG2 和每个依赖项的目录。然后我通过 apt 安装了 GPG2 及其依赖项。
现在我完全无法使用 GPG。

当我运行时gpg --clearsign我得到输出

gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: keydb_search failed: No agent running
gpg: no default secret key: No agent running
gpg: [stdin]: clear-sign failed: No agent running

当我跑步时gpg-agent --daemon我得到

gpg-agent: relocation error: gpg-agent: symbol gcry_get_config version GCRYPT_1.6
           not defined in file libgcrypt.so.20 with link time reference

当我跑步时gpg --version我得到

gpg (GnuPG) 2.2.4
libgcrypt 1.7.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/michael/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
    CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

答案1

我手动卸载了 libgcrypt 1.7.0,然后重新安装,然后再次卸载,方法是进入我从中下载的文件目录gnupg.org并运行

sudo make uninstall
sudo make install
sudo make uninstall

然后我通过运行 apt 重新安装了 libgcrypt

sudo apt install --reinstall libgcrypt20*

然后我转到 libgpg-error 1.21 目录并对 libgpg-error 1.21 执行了相同的操作。

sudo make uninstall
sudo make install
sudo make uninstall
sudo apt install --reinstall libgpg-error0

然后我进入 libassuan 2.4.2 的目录。我手动安装了 libassuan 2.4.2,然后卸载它,然后通过 apt 重新安装 libassuan。

sudo make install
sudo make uninstall
sudo apt install --reinstall libassuan0

相关内容