Step-by-step: Manually Install GMP for PHP 7.4
( i had issues installing the extension from the aapanel php74 extension list, it would not install )
1. Install Required System Libraries
GMP requires the GMP development package:
sudo apt-get update
sudo apt-get install -y libgmp-dev
2. Compile and Install the GMP Extension
cd /www/server/php/74/src/ext/gmp
/www/server/php/74/bin/phpize
./configure --with-php-config=/www/server/php/74/bin/php-config
make && make install
Example: After this, you should see gmp.so installed to your PHP extensions folder:
/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/
3. Edit PHP Configuration Files
Edit your PHP 7.4 configuration files:
/www/server/php/74/etc/php.ini
/www/server/php/74/etc/php-cli.ini
Add the following line:
extension=gmp
4. Restart PHP 7.4
/etc/init.d/php-fpm-74 restart
5. Verify the GMP Extension
php -m | grep gmp
You should now see:
gmp