Below you is my build instructions for GnuPG 2.1.20 released on 03-Apr-2017. 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.1.20 by entring the following:
curl -sL "https://gist.github.com/mattrude/3883a3801613b048d45b/raw/install-gnupg2.sh" |sh
apt-get -y install libgnutls-dev bzip2 make gettext texinfo gnutls-bin \