I am using ubuntu 11.04 and when I am opening terminal and typing php -a
it is showing some error like this
PHP Warning: PHP Startup: Unable to lo
sudo apt install php-gd
will work but the thing is it will download the plugin for the latest PHP version.
If your PHP version is not the latest, then you can add version in it:
# PHP 7.1
sudo apt install php7.1-gd
# PHP 7.2:
sudo apt install php7.2-gd
# PHP 7.3
sudo apt install php7.3-gd
# PHP 7.4 (latest)
sudo apt install php-gd