Warning: platform.txt from core 'Arduino megaAVR Boards' contains deprecated compiler.path={runtime.tools.avr-gcc.path}/bin/, automatically converted to compiler.path=/usr/bin/. Consider upgrading this core.
avr-g++: error: device-specs/specs-atmega4809: No such file or directory
exit status 1
Error compiling for board Arduino Nano Every.
Hi @davidnsousa. I can tell from the warning that you used a package manager such as APT to install a 3rd party modified version of Arduino IDE from a package repository instead of the official version of Arduino IDE. The modifications made to that version of Arduino IDE cause it to use a different compiler than the one Arduino intended to be used, which results in this error.
Although there is probably some way to install the missing components to make this work, I don't know how to do that so I can't help you. My recommendation is to uninstall this 3rd party version of Arduino IDE and instead install the official Arduino IDE. You can download it from the "Linux ARM 32 bits" or "Linux ARM 64 bits" (depending on whether you are using 32 or 64 bit version of Linux on your RPi) link on this page: