gpg-error command not found

In this troubleshooting guide we learn how to fix gpg-error command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

gpg-error: command not found

or when using sudo you get the following error message

sudo: gpg-error: command not found

Solutions to gpg-error: command not found

How To Fix gpg-error: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu gpg-error is provided by gpgrt-tools package.

gpgrt-tools is:

gpgrt (also known as libgpg-error) defines common error values, messages, and common runtime functionality for all GnuPG components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, pinentry, SmartCard Daemon and possibly more in the future.

This package contains yat2m, a Texinfo to nroff/troff converter useful for building manpages, and gpg-error, a binary for deciphering GnuPG/libgcrypt error codes.

To fix this problem, we can install more using the command below.

sudo apt-get -y install gpgrt-tools

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install gpgrt-tools.

sudo apt -y install gpgrt-tools

Or if you have aptitude installed you can use the following command.

sudo aptitude install gpgrt-tools

Summary

In this tutorial we learn how to fix gpg-error command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.