jcdammeyer, I really feel for you, you are getting well meaning advice from all quarters and I have been part of that. And sadly will continue to do so ...
rvk's script is cool but it has two problems IMHO, firstly, it goes to a lot of trouble to download a boot compiler and the build FPC from that, secondly, it scripts a fairly complicated process that is done, but most users, very infrequently. Step by step is safer.
A far easier approach, again, IMHO, on just about any Linux system (and Rasberry Pi is just another Linux system) is to install FPC from a tar ball, see
https://wiki.lazarus.freepascal.org/Installing_the_Free_Pascal_Compiler#FPC_Tar_Balls and then download and compile Lazarus, this is documented at
https://wiki.freepascal.orgBoth documented processes are a handful of steps, not a script, because that way, you can adapt as you see fit and you can see, and isolate any errors when they happen.
The only non "Linux standard" thing there is the need to increase swap space (as per rvk's script), something that not uncommon on Raspberry Pi and other systems with not a lot of memory.
I hope I have not made things worse.
Davo