The errormessage usually means that the .ppu that fpc finds is compiled with a different version than the current fpc compiler.
Probably you had a previous install with a different compiler version.
If you compile the program with -va, there is lots of output from fpc, including which fpc.cfg it uses, and wich ppu's it uses when trying to build your program.
Maybe this will show a remnant of the past fpc install.
Try to get rid of the old fpc installation.
(I don't know how to do that in Ubuntu, I'm on Suse, which uses rpm's)
(Or uninstall fpc/lazarus completely, then search for any file called fpc.cfg and any *.ppu (you should not find any) and simply delete them. After that install fpc, try to compile a simple hello worl program and see if that works. Only then install Lazarus)
See what config fpc uses and what paths. Check if they are OK (as in belonging to the newest fpc).
If there are no more old fpc remnants on your system, and Lazarus still won't compile any project, try to rebuild Lazarus (make clean all) and see if that helps.
Personally I prefer installing fpc from the binary package (somewhere in the download section), by running install.sh.
(
http://freepascal.org/download.var -> from Binaries select Linux (in my case Intel/i386) -> Choose mirror-> fpc-2.4.4.i386-linux.tar )
Then I build Lazarus from sources (in a subfolder of my homedirectory).
If I need to upgragde fpc, I simply delete the fpc folder (the package manager is not involved) and install the new one, the rebuild Lazarus from the sources again.
Hope this helps in any way.
Bart