Nano will not compile Blink sketch

I had a fairly complicated sketch compiled, uploaded, and running on a Nano.

Today I made some minor changes and the sketch would not compile.

I tried all advice I could find online.

I finally resorted to trying to compile Blink sketch which the IDE will not do.

Here is the error message:

Arduino: 1.8.11 (Mac OS X), Board: "Arduino Nano, ATmega328P"

/private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/hardware -hardware /Users/user/Library/Arduino15/packages -tools /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/tools-builder -tools /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/hardware/tools/avr -tools /Users/user/Library/Arduino15/packages -built-in-libraries /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/libraries -libraries /Users/user/Documents/Arduino/libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=0403_6001 -ide-version=10811 -build-path /var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/arduino_build_556516 -warnings=none -build-cache /var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/arduino_cache_169442 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/user/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=/Users/user/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avrdude.path=/Users/user/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/user/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/user/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/user/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/examples/01.Basics/Blink/Blink.ino
/private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/hardware -hardware /Users/user/Library/Arduino15/packages -tools /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/tools-builder -tools /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/hardware/tools/avr -tools /Users/user/Library/Arduino15/packages -built-in-libraries /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/libraries -libraries /Users/user/Documents/Arduino/libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=0403_6001 -ide-version=10811 -build-path /var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/arduino_build_556516 -warnings=none -build-cache /var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/arduino_cache_169442 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/user/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=/Users/user/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avrdude.path=/Users/user/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/user/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/user/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/user/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /private/var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/AppTranslocation/19FDBEC3-4D48-4525-9AE4-7F9B54F17353/d/Arduino-2.app/Contents/Java/examples/01.Basics/Blink/Blink.ino
Using board 'nano' from platform in folder: /Users/user/Library/Arduino15/packages/arduino/hardware/avr/1.8.2
Using core 'arduino' from platform in folder: /Users/user/Library/Arduino15/packages/arduino/hardware/avr/1.8.2
Detecting libraries used...
/Users/user/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=10811 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/user/Library/Arduino15/packages/arduino/hardware/avr/1.8.2/cores/arduino -I/Users/user/Library/Arduino15/packages/arduino/hardware/avr/1.8.2/variants/eightanaloginputs /var/folders/9p/7fq318yx00ndybtjsjnb_t3m0000gn/T/arduino_build_556516/sketch/Blink.ino.cpp -o /dev/null
fork/exec /Users/user/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 Nano.

I have looked for and cannot find "Users/user/Library/Arduino15/" or "Arduino15/" anywhere on my Mac.

I tried reinstalling IDE but same error.

Any suggestions on what I may have messed up?

areddon:
fork/exec /Users/user/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++: no such file or directory

This error indicates you need to take some drastic action. Be aware this will uninstall any boards you have installed via Boards Manager:

  • (In the Arduino IDE) File > Preferences
  • In the Arduino IDE, click the link on the line following “More preferences can be edited directly in the file”. This will open the Arduino15 (or similar name depending on OS) folder.
  • Delete all files and folders under the Arduino15 folder except for preferences.txt. Please be very careful when deleting things from your computer. When in doubt, back up!
  • Restart the Arduino IDE

Verify that you can now use your board before reinstalling any packages via Boards Manager.

areddon:
I have looked for and cannot find “Users/user/Library/Arduino15/” or “Arduino15/” anywhere on my Mac.

It’s a hidden folder. You need to configure Finder (or whatever) to show it. But with the instructions I provided above, you can get to that folder even with the folder still hidden.

Thank you so much. Wasted a lot of time looking for this folder. Your advice allowed me to fix this in two minutes. I really appreciate your help.