Software⏱️ 2 min read📅 2026-05-31

How to Fix: gpg: keyserver receive failed: No dirmngr

Error resolving gpg keyserver due to missing dirmngr. Install and enable dirmngr for apt-key adv.

Quick Answer: Enable dirmngr by running "sudo apt-get install gnupg dirmngr" and then try again with the original command.

To resolve the 'gpg: keyserver receive failed: No dirmngr' error, you need to ensure that the dirmngr service is running and properly configured on your system.

🛑 Root Causes of the Error

  • Insufficient or missing dirmngr configuration.

🔧 Proven Troubleshooting Steps

Method 1: Enable and Start dirmngr Service

  1. Step 1: Run the following command to enable and start the dirmngr service:
sudo systemctl enable --now dirmngr

Method 2: Configure dirmngr to Use Local Keyring

  1. Step 1: Create a new file at /etc/dirmngr/dirmngr.conf and add the following configuration:
dirmngr --keyserver-keyring /var/lib/apt/lists/

✨ Wrapping Up

By following these steps, you should be able to resolve the 'gpg: keyserver receive failed: No dirmngr' error and successfully receive keys using apt-key.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions