Solve the error: gpg: keyserver receive failed: No dirmngr

My personal blog: Zhang0Peter’s personal blog


Today’s error in using Add-apt-Repository is as follows:

gpg: keybox '/tmp/tmpnh5y5w9a/pubring.gpg' created
gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/run/user/0/gnupg/d.rkeyjbdrrh3u6cjumf59ra5t/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

The reason for this error is that GPG is not installed on Linux:

apt install dirmngr

An error to solve

Read More: