I try to compile the following program voor running on a NANO on a IDE running on a Raspberry PI4.
It gives errors while compiling.
When Compiling on a IDE on a LINUX MINT all is ok.
Do you actually have those single quotes in the code?
Should be double quotes for anything more than a single character. If you set preferences to show all compiler warnings you will see that in both versions of the IDE.
As far I know, that version is antique and therefore the WString implementation might not support floats; the list of candidates seems to indicate that.
I don't know if the Linux version on https://www.arduino.cc/en/software will work on the Pi. If not, a solution might be to copy WString.h and WString.cpp from your Mint system to the Pi (replacing the originals); make backups if needed.
Unfortunately, official builds of Arduino IDE 2.x for Linux ARM hosts are not yet available.
However, the one you get from the "Linux ARM" download links (I believe the RPi 4 is usually running a 64 bit operating system, in which case use that link instead of the "32 bits" one) under the "Legacy IDE (1.8.X)" section lower down on the Software page will work: