gpg2 command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
gpg2: command not found
or when using sudo you get the following error message
sudo: gpg2: command not found
Solutions to gpg2: command not found
How To Fix gpg2: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu gpg2 is provided by gnupg2 package.
gnupg2 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 is a dummy transitional package that provides symlinks from gpg2 to gpg.
To fix this problem, we can install more using the command below.
sudo apt-get -y install gnupg2
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install gnupg2.
sudo apt -y install gnupg2
Or if you have aptitude installed you can use the following command.
sudo aptitude install gnupg2
Summary
In this tutorial we learn how to fix gpg2 command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.