Atualize os arquivos de índice de pacotes ( php5-common 5.3.2-1ubuntu4.7)
$ sudo apt-get update
$ sudo apt-get install php5-gd
Verifique a sequência de caracteres em /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
Corrigir:
$ 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