0

I am trying to upload my code to my new Arduino (Just got one today, so im very new).

I can compile my code with no problems, but uploading it gives me:

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

Sketch uses 1,186 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
chmod: Unable to change file mode on /private/var/folders/md/s6pczlkd6gq8ylyh13z_3z8r0000gn/T/AppTranslocation/0D981E7A-E386-4AFD-9AEC-35E9ED8DA180/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude_bin: Read-only file system
/private/var/folders/md/s6pczlkd6gq8ylyh13z_3z8r0000gn/T/AppTranslocation/0D981E7A-E386-4AFD-9AEC-35E9ED8DA180/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude: line 6: /private/var/folders/md/s6pczlkd6gq8ylyh13z_3z8r0000gn/T/AppTranslocation/0D981E7A-E386-4AFD-9AEC-35E9ED8DA180/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude_bin: Permission denied
/private/var/folders/md/s6pczlkd6gq8ylyh13z_3z8r0000gn/T/AppTranslocation/0D981E7A-E386-4AFD-9AEC-35E9ED8DA180/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude: line 6: exec: /private/var/folders/md/s6pczlkd6gq8ylyh13z_3z8r0000gn/T/AppTranslocation/0D981E7A-E386-4AFD-9AEC-35E9ED8DA180/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude_bin: cannot execute: Undefined error: 0
/private/var/folders/md/s6pczlkd6gq8ylyh13z_3z8r0000gn/T/AppTranslocation/0D981E7A-E386-4AFD-9AEC-35E9ED8DA180/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude: line 6: exec: /private/var/folders/md/s6pczlkd6gq8ylyh13z_3z8r0000gn/T/AppTranslocation/0D981E7A-E386-4AFD-9AEC-35E9ED8DA180/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude_bin: cannot execute: Undefined error: 0

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

It doesn't matter what i upload (tried to upload some of the examples).

As said i am very new, so if you need any more information to help me just ask.

Thanks in advance!

  • Please format your question appropriately. In this case the big block you copy-pasted here should be contained within a code block (the button with two curly brackets {}) – Roberto Lo Giacco Sep 8 '16 at 20:55
0

Drag Arduino.app out of your ~/Downloads folder to /Applications or anywhere else that isn't where you downloads it to. The app is being subjected to Gatekeeper Path Randomization which means it is running on a read-only file system. The app is trying to chmod something inside the app bundle and thats not possible on a read-only file system.

| improve this answer | |
  • Thank you! I didn't know that this was a thing ;) – Mads Nielsen Sep 9 '16 at 20:06
0

Check your port to which your arduino is connected. The port name can be checked from Arduino IDE. Click Tools -> Port -> There you can find the port name. Open Terminal and type the following command.

sudo chmod 777 /dev/port_name

After this try to Recompile/Upload the code again.

| improve this answer | |
  • i ran sudo chmod 777 /dev/cu.usbmodem1411. Still same problem. – Mads Nielsen Sep 8 '16 at 19:01
  • Are you sure? You are using correct port name?Try dmesg | grep tty to list all Serial Device Converter – Mayank Pal Sep 8 '16 at 19:09
  • Try to run your Arduino IDE with super user privileges, because the compilation log shows most of the errors are related to inadequate rights of writing/executing on files. – Mayank Pal Sep 8 '16 at 19:22
  • I ran sudo /Users/madsankernielsen/Downloads/Arduino.app/Contents/MacOS/Arduino and now it won't even compile it. Am i doing it right? – Mads Nielsen Sep 8 '16 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.