worked for me on Lucid Lynx after an "apt-get update" and an "apt-get upgrade" as shown below:
root@none:~ # apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libapache2-mod-php5 php5-common
Suggested packages:
php-pear php5-suhosin
The following NEW packages will be installed:
libapache2-mod-php5 php5-common php5-gd
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 3407kB of archives.
After this operation, 8925kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1
http://archive.ubuntu.com/ubuntu/ lucid/main php5-common 5.3.2-1ubuntu4 [541kB]
Get:2
http://archive.ubuntu.com/ubuntu/ lucid/main libapache2-mod-php5 5.3.2-1ubuntu4 [2831kB]
Get:3
http://archive.ubuntu.com/ubuntu/ lucid/main php5-gd 5.3.2-1ubuntu4 [34.7kB]
Fetched 3407kB in 2s (1484kB/s)
Selecting previously deselected package php5-common.
(Reading database ... 124232 files and directories currently installed.)
Unpacking php5-common (from .../php5-common_5.3.2-1ubuntu4_i386.deb) ...
Selecting previously deselected package libapache2-mod-php5.
Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.3.2-1ubuntu4_i386.deb) ...
Selecting previously deselected package php5-gd.
Unpacking php5-gd (from .../php5-gd_5.3.2-1ubuntu4_i386.deb) ...
Setting up php5-common (5.3.2-1ubuntu4) ...
Setting up libapache2-mod-php5 (5.3.2-1ubuntu4) ...
Creating config file /etc/php5/apache2/php.ini with new version
* Reloading web server config apache2