Avr-g++: not found

Hello,

Using VS Code on a Raspberry Pi OS, I am not able to build and upload to my arduino board and keep getting “avr-g++: not found”.

So far, I’ve tried the troubleshooting methods described in Error : sh1 : avr-g++ not found but when I run the lines suggested here I get the following:

capturing@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
capturing@raspberrypi:~ $ file ~/.platformio/packages/toolchain-atmelavr/bin/avr-g++
/home/capturing/.platformio/packages/toolchain-atmelavr/bin/avr-g++: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=003b5d1e0e3e162c4606d4ad9d0ce02e3e49074e, stripped
capturing@raspberrypi:~ $ ldd ~/.platformio/packages/toolchain-atmelavr/bin/avr-g++
not a dynamic executable

Any help would be greatly appreciated!

I think we discussed this at Build failed on new ESP32 project - xtensa g++ compiler not found #3713 already.

1 Like

Thanks for pointing me to this solution!

I added arm_64bit=0 to /boot/config.txt, rebooted, and reopened VSCode. After loading platformio, everything works as it should.

This is the post that worked… Build failed on new ESP32 project - xtensa g++ compiler not found #3713 - #9 by kdebarb63