php-captcha - generate security code using PHP
to check if enable "GD" or not type on command line:
php --ri GD
if result "GD Support => enabled" AND some info, it is already installed & enabled, do not try this steps to installation
sudo apt-get install php5-gd
sudo service apache2 restart
sudo yum install php-gd
or to PHP5
sudo yum install php5-gd
and restart apache server
sudo /etc/init.d/apache2 restart