gpg: 在ubuntu中找不到有效的OpenPGP数据。

当我执行sudo add-apt-repository -y ppa:ethereum/ethereum时,会出现错误信息,例如:
gpg: keybox '/tmp/tmpy4v562r0/pubring.gpg' created gpg:

/tmp/tmpy4v562r0/trustdb.gpg: trustdb created gpg: key

1C52189C923F6CA9: public key "Launchpad PPA for Ethereum" imported

gpg: Total number processed: 1 gpg: imported: 1

**gpg: no valid OpenPGP data found.**

我尝试了很多方法,但都没有成功。请帮我解决这个问题。
1个回答

首先移除以太坊仓库:

sudo add-apt-repository --remove ppa:ethereum/ethereum
sudo apt update

删除导入的 GPG 密钥:
sudo apt-key del 2A518C819BE37D2C2031944D1C52189C923F6CA9

重新导入以太坊软件仓库的 GPG 密钥:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2A518C819BE37D2C2031944D1C52189C923F6CA9

再次添加存储库:
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt update

更新

再次移除以太坊存储库:

sudo add-apt-repository --remove ppa:ethereum/ethereum
sudo apt update

删除导入的 GPG 密钥:
sudo apt-key del 2A518C819BE37D2C2031944D1C52189C923F6CA9

尝试

gpg --keyserver keyserver.ubuntu.com --recv-keys 2a518c819be37d2c2031944d1c52189c923f6ca9

下一个
gpg --export --armor 2a518c819be37d2c2031944d1c52189c923f6ca9 | sudo apt-key add -

添加Ubuntu 16.04的软件源:
echo -e "deb http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/ethereum-ubuntu-ethereum-xenial.list

更新apt:
sudo apt update

从以太坊仓库中安装您想要的软件。

1我尝试了你的步骤,但在执行"sudo add-apt-repository -y ppa:ethereum/ethereum"后出现了错误,类似于: gpg: keybox '/tmp/tmpjj0_soy7/pubring.gpg' 已创建 gpg: /tmp/tmpjj0_soy7/trustdb.gpg: trustdb 已创建 gpg: 导入公钥 1C52189C923F6CA9:"Launchpad PPA for Ethereum" gpg: 总共处理了 1 个密钥 gpg: 导入了 1 个密钥 gpg: 没有找到有效的 OpenPGP 数据。 Thread-1 中的异常: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() - Kiran Devkar
1不需要执行 sudo add-apt-repository -y ppa:ethereum/ethereum 命令吗? - Kiran Devkar