As you can see, I'm not an Ubuntu user so take this with a grain of salt. I believe in Ubuntu you install
build-essential using Synaptic to get the complete toolchain. You should be able to compile source after that. I recommend that you
Read the Friendly Manual.
Note, that link is for ver 6.10 of Ubuntu.