GnuPG 2.2.x Build Instructions
Below are my build instructions for GnuPG 2.2.3, released on November 20th, 2017. These instructions are built for a headless Ubuntu 14.04 LTS server (and have also been tested on Ubuntu 15.10/16.04/16.10/17.04).
If you prefer, you may use the below install script to install GnuPG 2.2.x by running the following commands:
curl -OL "https://gist.githubusercontent.com/vt0r/a2f8c0bcb1400131ff51/raw/c692d1751dbd91b066a9096508b10bd85b4d264a/install-gnupg22.sh" && sudo -H bash ./install-gnupg22.sh