in reply to Can't install GD on Ubuntu
You go and install libgd 2 such that it comes with gdlib-config program, and you can find it using which gdlib-config
On ubuntu that might involve something called apt