Error verifying code

Hi,

I am new to arduino and I am just trying the example sketch "Blinking Led"

const int LED = 13; //led connected to digital  pin 13
void setup()
{
  pinMode(LED, OUTPUT); //sets teh digital pin as output
}

void loop() {
  digitalWrite(LED, HIGH); //turns the led on
  delay(1000); //waits for a second
  digitalWrite(LED, LOW); //turns the led off
  delay(1000); //waits for a second
}

I get the following error:

/Applications/Arduino 3.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld: /Applications/Arduino 3.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so: error loading plugin: dlopen(/Applications/Arduino 3.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so, 2): Symbol not found: _environ Referenced from: /Applications/Arduino 3.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so Expected in: /usr/lib/libSystem.B.dylib

collect2: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino/Genuino Uno.

I am using a Mac with OSX 10.7.5 and Arduino 1.8.5

Any suggestions to solve this?

The problem is that your version of OSX is too old for the version of Arduino AVR Boards you're using: https://github.com/arduino/Arduino/issues/7074

You have two options: Update your OSX or use an older version of Arduino AVR Boards.

Here's how to do the latter:

  • Tools > Board > Boards Manager
  • Wait for the download to finish
  • Click on Arduino AVR Boards
  • Select "1.6.11" from the "select version" drop down menu"
  • Click "Install"
  • Wait for installation to finish
  • Click "Close"

This is related to a compiler update in Arduino AVR Boards 1.6.12, that's why installing 1.6.11 will fix it. You will need to avoid upgrading to any Arduino AVR Boards version above 1.6.11.