gpg command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
gpg: command not found
or when using sudo you get the following error message
sudo: gpg: command not found
Solutions to gpg: command not found
How To Fix gpg: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu gpg is provided by gpg package.
gpg is:
GnuPG is GNU’s tool for secure communication and data storage. It can be used to encrypt data and to create digital signatures. It includes an advanced key management facility and is compliant with the proposed OpenPGP Internet standard as described in RFC4880.
This package contains /usr/bin/gpg itself, and is useful on its own only for public key operations (encryption, signature verification, listing OpenPGP certificates, etc). If you want full capabilities (including secret key operations, network access, etc), please install the “gnupg” package, which pulls in the full suite of tools.
To fix this problem, we can install more using the command below.
sudo apt-get -y install gpg
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install gpg.
sudo apt -y install gpg
Or if you have aptitude installed you can use the following command.
sudo aptitude install gpg
Summary
In this tutorial we learn how to fix gpg command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.