Error message, can't compile because "no such file or directory"

Arduino: 1.8.19 (Mac OS X), Board: "Arduino Uno"

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

Keep getting this issue, tried changing ports and reinstalling the IDE, but didn't work. Saw a older post related to this but no solution was given. Can anyone help?

Hi @frst. I'm going to ask you to provide some additional information that might allow us to determine the cause of the problem.

Please do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Check the box next to "Show verbose output during: ☐ compilation".
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. After the compilation fails you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages. Click that button.
    This copies the full output to the clipboard.
  6. Open a forum reply here by clicking the Reply button.
  7. Click the </> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  8. Press Ctrl+V.
    This will paste the compilation output into the code block.
  9. Move the cursor outside of the code tags before you add any additional text to your reply.
  10. Click the Reply button to post the output.
Arduino: 1.8.19 (Mac OS X), Board: "Arduino Uno"











/private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware -hardware /Users/mehulkhajuria/Library/Arduino15/packages -tools /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/tools-builder -tools /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/mehulkhajuria/Library/Arduino15/packages -built-in-libraries /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/libraries -libraries /Users/mehulkhajuria/Documents/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10819 -build-path /var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/arduino_build_400760 -warnings=none -build-cache /var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/arduino_cache_148435 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=/private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/tools/avr -verbose /var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/untitled2117566749.tmp/sketch_jan25a/sketch_jan25a.ino
/private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware -hardware /Users/mehulkhajuria/Library/Arduino15/packages -tools /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/tools-builder -tools /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/mehulkhajuria/Library/Arduino15/packages -built-in-libraries /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/libraries -libraries /Users/mehulkhajuria/Documents/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10819 -build-path /var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/arduino_build_400760 -warnings=none -build-cache /var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/arduino_cache_148435 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=/private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/tools/avr -verbose /var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/untitled2117566749.tmp/sketch_jan25a/sketch_jan25a.ino
Using board 'uno' from platform in folder: /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/arduino/avr
Using core 'arduino' from platform in folder: /private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/arduino/avr
Detecting libraries used...
/Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/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=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/AppTranslocation/C7F2520D-38DD-4A9C-AFB3-EDD85516D655/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard /var/folders/b0/262418vn7cn3hk28lw8x7yww0000gn/T/arduino_build_400760/sketch/sketch_jan25a.ino.cpp -o /dev/null
fork/exec /Users/mehulkhajuria/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++: no such file or directory
Error compiling for board Arduino Uno.

I did some more digging and think I found a solution. I'm going to attach it here in case someone might need it.

xec: "C:\Users\USERNAME\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++": file does not exist

This the error above, the file is not there.
This happens when running a suggested "Board update" while compiling something. Then the update doesnt work and the board is unusable.

I fixed it with Board Manager -> Install "Arduino AVR Boards (1.6.19)" -> Restart Arduino IDE -> Install Arduino AVR Boards 1.6.20+ again. Then it worked. Simply reinstalling the complete Arduino IDE didnt help. I first tried to install 1.8.4 over 1.8.3 and still had the same issue.

1 Like

@frst the installation and troubleshooting section is for getting the system going it is specifically NOT for your project. Please take more care when choosing a section to post in. You might even want to actually read the description of the section before you post in it.

Therefore I have moved your post to a more appropriate section.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.