Hi Raspi user,
because in the past 6 years I had a lot of trouble to install the current stable Lazarus versions with all the differently methods to my raspis, I wrote this tutorial. I'm sure there will be problems in the future too. So please give me information about this problems and how to solve this problems, so I can work on this tutorial.
Hopefully you'll have success with the installation.
Thanks for the effort, but it is not necessary, because there are supported .debs in the Rasbian repository that are created and maintained by Debian.
If you perform these simple steps you can subsequently update your installations by building from source and gives you a good and proper foundation to work with.
The recommended way is different from yours
Simply this is enough and strongly recommended:
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install fpc && sudo apt-get install lazarus
For Raspbian buster this installs fpc 3.0.4 and Lazarus 2.0.0
and all its dependencies. and creates menu entries and icons.
Just verify that all the paths are correct in /etc/fpc.cfg
The install base is /usr so /usr/bin/ for the compiler and /usr/lib/arm-linux-gnueabihf/fpc/3.0.4/ for the libraries.
If you need to adapt paths, use $FPCVERSION instead of 3.0.4.
Normally the paths are correct, but not if you have any previous installed versions or used an install from the freepascal or lazarus website. (these install in /usr/local)
===========================================================================================================================
The next is only necessary if you did not follow the above install previously:Trouble shooting guidelines before a recommended install:Steps for messed up and previous installations before installing from apt:
Should you have installations from the fpc/lazarus website first remove those:
sudo apt-get purge lazarus && sudo apt-get purge fpc && sudo apt-get autoremove
If you did previously build from source, go to the directory root with the fpc directory as child and do
sudo rm -rf fpc && sudo rm /etc/fpc.cfg
do the same for lazarus, go to the parent directory of the lazarus directory and
Last step: delete the hidden lazarus directory in /home/<user>:
cd /home/<username>
sudo rm -rf .lazarus
Note the dot: it is a hidden directory (if it exists)
After that you can perform the above recommended installation from apt without trouble.