Cannot find GD library?

I installed a php script that requires GD library.
Basically what the script does is to generate images dynamically.
There seems to be GD library installed on my hosting machine
(I find libgd* in /usr/lib).
but for some reason the script fails in creating images; looks like it does not find the GD library?

Do you know what the problem could be?