I can compile it on any Raspberry Pi so what is the exact problem?
- Version of the Raspberry Pi?
- Version of Raspbian?
- Version of FPC and Lazarus you need?
If you give that information I can give guidance.
BTW: you are definitely not on Raspbian buster, because then 3.0.4 can be installed from Apt.
Or Raspbian stretch with back-ports.
More info needed. It is quite easy.
In short: you did not ever upgrade your system.<
>
If you really did not do that, you are a beginner and I would be glad to explain how to get the most recent FPC and Lazarus on a Raspberyy Pi.