How to install php5-gd on ubuntu?

I'm running ubuntu 10.04.

I just ran the command,

sudo apt-get install php5-gd

but it gave me this error

The following packages have unmet dependencies:
  php5-gd: Depends: php5-common (= 5.3.2-1ubuntu4) but 5.3.2-1ubuntu4.5 is to be installed
E: Broken packages

When tried an apt-get install on php5-common, but it says i already have the most recent version. How do i install php5-gd?

Additional Info Here's what I see after doing a sudo apt-get update | grep main

Ign http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US
Ign http://dl.google.com/linux/chrome/deb/ stable/main Translation-en_US
Ign http://dl.google.com/linux/talkplugin/deb/ stable/main Translation-en_US
Hit http://us.archive.ubuntu.com lucid/main Packages
Hit http://us.archive.ubuntu.com lucid/main Sources
Get:5 http://dl.google.com stable/main Packages [1,093B]
Get:6 http://dl.google.com stable/main Packages [737B]

Solution 1:

Update package index files(current php5-common 5.3.2-1ubuntu4.7):

$ sudo apt-get update
$ sudo apt-get install php5-gd

Check follow string in /etc/apt/sources.list:

deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb http://security.ubuntu.com/ubuntu lucid-security main restricted

Fix:

$ sudo -s
# echo "deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted" >> /etc/apt/sources.list
# echo "deb http://security.ubuntu.com/ubuntu lucid-security main restricted" >> /etc/apt/sources.list
# apt-get update
# apt-get install php5-gd