Install GMP for PHP 8.1

It has been headache for some users to install GMP extension for PHP 8+ versions. gmp module is being used by many popular packages (like ccxt, bignumbers or etc).
The easy way I find it to install, is using PHPBrew, you might look into the referred links from this article under PHPbrew paragraph, then run:

sudo apt install php8.1-gmp
phpbrew ext install gmp
# some people also said, but I can't confirm: sudo apt-get install -y libgmp-dev

and in `/root/.phpbrew/php/8.x.x/etc/php.ini

enable gmp extension (or do a2enmod gmp )
and systemctl restart apache2

Leave a Comment

Your email address will not be published. Required fields are marked *

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.