arduino5/bin/avr-g++: no such file or directory


I have been using Arduino for years and I am not sure what happened but nothing works anymore.

I keep getting this error. I tried a lot of the responses I found online but nothing changes.

What steps can I take to fix this? The show is tomorrow. Thank you.

Here is the error report:

Arduino: 1.8.10 (Mac OS X), Board: "Arduino/Genuino Uno"

fork/exec /Users/caseyscalf/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++: no such file or directory
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

And more information:

Arduino: 1.8.10 (Mac OS X), Board: "Arduino/Genuino Uno"

/Applications/Arduino/Arduino -dump-prefs -logger=machine -hardware /Applications/Arduino/Arduino -hardware /Users/caseyscalf/Library/Arduino15/packages -tools /Applications/Arduino/Arduino -tools /Applications/Arduino/Arduino -tools /Users/caseyscalf/Library/Arduino15/packages -built-in-libraries /Applications/Arduino/Arduino -libraries /Users/caseyscalf/Documents/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10810 -build-path /var/folders/g6/kkkwg77j2q5f6_hxp4dpsd_40000gn/T/arduino_build_25046 -warnings=none -build-cache /var/folders/g6/kkkwg77j2q5f6_hxp4dpsd_40000gn/T/arduino_cache_460481 -prefs=build.warn_data_percentage=75 -verbose /Users/caseyscalf/Google Drive/Sync/Projects/SAM Arduino Wave/SendOSC2/SendOSC2.ino
/Applications/Arduino/Arduino -compile -logger=machine -hardware /Applications/Arduino/Arduino -hardware /Users/caseyscalf/Library/Arduino15/packages -tools /Applications/Arduino/Arduino -tools /Applications/Arduino/Arduino -tools /Users/caseyscalf/Library/Arduino15/packages -built-in-libraries /Applications/Arduino/Arduino -libraries /Users/caseyscalf/Documents/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10810 -build-path /var/folders/g6/kkkwg77j2q5f6_hxp4dpsd_40000gn/T/arduino_build_25046 -warnings=none -build-cache /var/folders/g6/kkkwg77j2q5f6_hxp4dpsd_40000gn/T/arduino_cache_460481 -prefs=build.warn_data_percentage=75 -verbose /Users/caseyscalf/Google Drive/Sync/Projects/SAM Arduino Wave/SendOSC2/SendOSC2.ino
Using board 'uno' from platform in folder: /Applications/Arduino/Arduino
Using core 'arduino' from platform in folder: /Applications/Arduino/Arduino
Detecting libraries used...
/Users/caseyscalf/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10810 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/Applications/Arduino/Arduino" "-I/Applications/Arduino/Arduino" /var/folders/g6/kkkwg77j2q5f6_hxp4dpsd_40000gn/T/arduino_build_25046/sketch/SendOSC2.ino.cpp -o /dev/null
fork/exec /Users/caseyscalf/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++: no such file or directory
Error compiling for board Arduino/Genuino Uno.

Try closing all Arduino IDE windows, restarting the Arduino IDE, and then compiling again. It's possible that will fix the problem.

I know the feeling seems to happen all the time now. Comment out the includes to find exactly which one is stopping the compile if that is not obvious. Then put them back one by one till it fails to compile then download that one from GitHub.

This error is not caused by #includes. This is caused by a glitch in the Arduino IDE or the Arduino AVR Boards installation.

in that case even clicking new and then compile would fail.

Most likely.

well that is a bunch of malarkey.

well that is a bunch of malarkey.

Huh? I don't understand what you mean by that. Are you having this problem too?

The fact that a sketch with no real code will not compile to a board. What is going on with this stuff? We dont buy it to spend all day copying errors to google.

This seems to be happening since recent versions (particularly on mac?), but as far as I know, the sequence of events that leads to it has not been described, at least on these forums, and it is likely that nobody has yet found a way to consistently reproduce it so that the developers can fix it.

I suspect using board manager to update (or switch between two versions) of the AVR core will resolve it. (for good measure, I'd probably restart the IDE between these steps)

If not, exiting IDE, deleting the contents of users/yourusername/Library/Arduino15, and restarting the IDE will almost certainly fix it (you'll need to use board manager to reinstall any board packages other than the avr board package that you were using).

I'll ask again. Are you having this problem? If not, then stop getting all upset about it because it's not at all helpful in solving the issue for @Sensebellum (which for all we know is already solved). If you don't have anything productive to contribute here, move alone.

In a perfect world, this sort of error would never occur. But the Arduino software is written by humans and humans make mistakes. I can tell you that the code I write certainly isn't free from bugs. How about yours? Out of the hundreds of thousands of people using the Arduino IDE every day, it works perfectly for easily 99.5% of them.

We dont buy it to spend all day copying errors to google.

It's free open source software. You didn't buy it! If it really bothers you, fix the bug and submit a pull request. That's how open source works.

I don’t really know what a pull request is. But I suppose one could compile to several boards looking for one that works, then buy that board.

No need to buy the boards. This is a compilation error. You can compile for any board you like without buying one. But why not just fix the problem instead? It's easy enough to do.