@[WSL ubuntu gpg IPC connect call failed]
现象
使用WSL 2安装docker的时候,报错如下:
$ curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
gpg: can't connect to the agent: IPC connect call failed
use sudo apt update then will get something like The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5523BAEEB01FA116
Got the pubkey 5523BAEEB01FA116
Use curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x5523BAEEB01FA116" | sudo apt-key add Replace 0x5523BAEEB01FA116 with 0x<your pubkey in 2step>
complete, you can run sudo apt udpate no error
此种方法未奏效。
解决方案
$ wget -q "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA87FF9DF48BF1C90" -O- | gpg --dearmor > spotify-A87FF9DF48BF1C90.gpg
$ sudo mv A87FF9DF48BF1C90.gpg /etc/apt/trusted.gpg.d/
其它方法经测试都不好试,这个是最OK的,纪录一下。