Installing GMP should be easy:
if you need it for a PHP application then you can just do this:
apt-get install php5-gmp
nano /etc/php5/apache2/php.ini
#add the following line to the ini file
Added extension=php_gmp.so to php.ini
#save and restart apache
service apache2 restart
If you need the latest build for any other reason do this:
the first thing I do is:
cd /
mkdir downloads
cd downloads
Get the tar from here https://gmplib.org/
at the time of this article I used:
wget https://gmplib.org/download/gmp/gmp-6.0.0a.tar.lz
You will need lzip installed and dev tools
apt-get install build-essential gawk m4 gcc-multilib
apt-get install lziptar --lzip -xvf
gmp-6.0.0a.tar.lz
cd gmp-6.0.0.0
mkdir build && cd build
../configure --prefix=/usr/gcc_4_9 --build=x86_64-linux-gnu
make
make check
make install