This article will describe how to compile Google Authenticator directly from source by cloning the source code from the official GitHub repository.
If you need to know why you should compile and avoid the apt Ubuntu package, please read the previous article first.
How to Compile google-authenticator-libpam From GitHub?
Here we go, these steps will be sufficient to git clone it and compile it on your Ubuntu server:
apt install libqrencode-dev -y
apt install libtool -y
apt install libpam-dev -y
apt install autoconf -y
apt install make -y
git clone https://github.com/google/google-authenticator-libpam.git
rm -rf google-authenticator-libpam
apt remove libtool -y
apt remove libpam-dev -y
apt remove autoconf -y
apt remove make -y
In the upcoming articles, I will describe a bullet-proof way to set it up.