I discovered the source of the bug. Although I was running with the 2.6.32 kernel I had also installed an experimental 10.04 2.6.35 kernel. The nvidia driver install would succeed building itself for the 2.6.32 kernel but when it tried to compile for the 2.6.35 kernel it would fail.
After completely uninstalling the 2.6.35 kernel package using synaptic everything started working fine.
I discovered the source of the bug. Although I was running with the 2.6.32 kernel I had also installed an experimental 10.04 2.6.35 kernel. The nvidia driver install would succeed building itself for the 2.6.32 kernel but when it tried to compile for the 2.6.35 kernel it would fail.
After completely uninstalling the 2.6.35 kernel package using synaptic everything started working fine.