How do I enable GD support in a CentOS installation?
The thing that did the trick for me in the end was:
yum install gd gd-devel php-gd
and then restart apache:
service httpd restart
sudo yum install php-gd
With CentOS 6.5+ and PHP 5.5:
yum install php55u-gd service httpd restart
If you receive an error message: cannot map zero-fill pages: Cannot allocate memory in Unknown on line 0 , this may be due to the fact that you do not have a swap file. I suggest you take a look at the tutorial mentioned in this answer: https://stackoverflow.com>
cannot map zero-fill pages: Cannot allocate memory in Unknown on line 0
Tutorial: https://www.digitalocean.com/community/articles/how-to-add-swap-on-centos-6
CentOs 6.5+ and PHP 5.6:
sudo yum install php56-gd service httpd restart
Enter command
yum install php-gd
and reboot the server (httpd, nginx, etc.)