i got the same error
fork/exec /usr/bin/avr-g++: no such file or directory
Error compiling for board Arduino/Genuino Uno.
i try to
rm ~/.arduino15
or
sudo arduino
sudo ln -s /usr/bin/g++ /usr/bin/avr-g++
but they are not useful.
How should i do?