How to install GMP Math on cPanel

install GMP Math
install GMP Math

How to install GMP Math on cPanel

This post help you to install GMP Math on cPanel server. GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich set of functions, and the functions have a regular interface.

EasyApache 3

If you are running EasyApache 3 on your cPanel server, please run the following commands to install GMP Math.

cd /usr/local/src/
tar -xvf gmp-4.3.2.tar.gz
cd gmp-4.3.2
make check
make install

Open the file “all_php5

vim /var/cpanel/easy/apache/rawopts/all_php5

Add the following into it


Build EasyApache with default settings.

/scripts/easyapache --build

Once the build completed, please run the following command to verify gmp is installed properly.

php -m | grep gmp

EasyApache 4

If you are running EasyApache 4 on your cPanel server, then the installation is quite simple. Execute the following commands to enable GMP Math on different PHP versions which is available on EasyApache 4.

PHP 5.4

yum install ea-php54-php-gmp

PHP 5.5

yum install ea-php55-php-gmp

PHP 5.6

yum install ea-php56-php-gmp

PHP 7.0

yum install ea-php70-php-gmp

PHP 7.1

yum install ea-php71-php-gmp

That’s it!

If you like this post and wish to receive more articles from us, please like our FB page: Grepitout

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at