Error compiling for board

I’m getting this error message when trying to compile for my arduino micro, the code compiles and uploads fine in the online editor but will not compile in the downloaded IDE. I tried following the path and there is no such folder called library in my user folder.

Arduino: 1.8.8 (Mac OS X), Board: “Arduino/Genuino Micro”

fork/exec /Users/Jacobdoyle/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++: no such file or directory
Error compiling for board Arduino/Genuino Micro.

This error indicates you need to take some drastic action. Be aware this is somewhat advanced and will remove any boards you have installed via Boards Manager:

  • Click the link on the line following File > Preferences > 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.

jacobdoyle9: I tried following the path and there is no such folder called library in my user folder.

I believe the OS hides that folder. You can probably configure the options for Finder (or whatever it's called) to show hidden folders.