Replace all mentions you can find of 2.4.2 with 2.5.1, and you should be good again

Units compiled with a different version of the compiler cannot be used by the same compiler. It might be a very different PPU structure. Hence, you will also have to recompile lazarus when you've inserted the new FPC version info