Aaaa this is sooo frustrating.
I bought the book "LazarusHandbook" and followed all the steps to the letter. I got version 2.0.2 installed.
Now if I add packages I get the error
lazarus.pp(167,1) Error: Can't call the resource compiler "/usr/local/bin/fpcres", switching to external mode
Please help me.......
create a swap of 1 GB (1024MB)
- Open /etc/dphys-swapfile as root :
sudo nano /etc/dphys-swapfile
Goto the line that says CONF_SWAPSIZE=100
Change that to CONF_SWAPSIZE=1024
Save the file and reboot. ( ctrl-x and yes , sudo reboot)
The reason is that the compiler runs out of available memory.
We have
already explained many times that Lazarus needs such a swap file to successfully build on a Raspberry Pi with 512 or 1024MB memory...
If you have a Raspberry Pi 4 with 2 or 4 GB these steps are not necessary anymore.
Note these steps are also necessary for large projects in other languages like clang or GNU C(++), e.g. building the kernel from source.
This is not FPC/Lazarus specific.
See screenshot