How to install GMP for PHP7 on Ubuntu
The new way in PHP 7 to install extensions is to just write "php-EXTENSION" In this case it's as simple as:
sudo apt-get install php-gmp
For PHP 7.4:
sudo apt-get install php7.4-gmp
SO: Ubuntu 20.04
For PHP 7.2:
sudo apt-get install php7.2-gmp
To install GMP for PHP7.0 on Ubuntu, run:
sudo apt-get install php7.0-gmp
Make sure your php.ini
contains the following:
extension=php_gmp.so
To find out where your php.ini
is located, run:
php --ini