If you try to install GD with:

and you receive the message: “Could not find gdlib-config”

then first type:

and then install GD via cpan

Checked on Centos 5 and perl 5.8.8