Build instructions for GnuPG 2.2.23. These instructions are built for a headless Ubuntu 16.04 LTS server.
Or if you wish, you may use the install script to install GnuPG 2.2.23 by entring the following:
curl -sL "https://gist.github.com/shrutikaponde/25a4da010c9a8d2faf5edceacd1b07e1/raw/install-gnupg2.sh" |sh
sudo apt-get -y install libgnutls-dev bzip2 make gettext texinfo gnutls-bin \