One issue that Ubuntu has that some other systems might not have is that 
the header files and compilers are not installed by default as the user 
will be installing pre-compiled applications with the package manager. 
To get this to work for me I have had to use package manager to install 
the libc (libstdc???) headers package and make and all the other tools 
to get things to work. You can actually install the C compiler but this 
does not automatically include the various header files. For that you 
need to download the appropriate package.

I'm away from my Ubuntu box at the moment so I can't give you the 
details but this could be something to check.