avr-g++: no such file or directory

That's fine. It just means the program was successfully uploaded to your Arduino board. avrdude is the tool used to do that.