If you use Debian/Ubuntu/Mepis then you should be able to install it by apt-get install gd2 (or something similar)
If you are using SuSe then you would use the yast tool...
On all other system: no clue....