On Debian/Ubuntu Linux, gflags can be installed using the following command:
sudo apt-get install libgflags-dev
On Debian/Ubuntu Linux, glog can be installed using the following command:
git clone https://github.com/google/glog.git
cd glog
mkdir cmake_build
cd cmake_build
cmake -H. -Bbuild -G "Unix Makefiles" ..
sudo make install