Compiling error [Bad system call]

I have installed Arduino IDE on Ubuntu 16.04 and ran it. I wrote this simple code and have following error.

void setup() {
  // put your setup code here, to run once:
  pinMode(5, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(5, HIGH);
  delay(1000);
  digitalWrite(5, LOW);
  delay(1000);
}

Arduino: 1.6.10 (Linux), Board: "Arduino/Genuino Uno"

/snap/arduino-mhall119/3/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar terminated with signal 31 [Bad system call]
exit status 1
Error compiling for board Arduino/Genuino Uno.

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

Compiles for me on Win10.

I instaled old version Arduino 1.0.5 and it has already working.

I have the exact same problem with the exact same version of Arduino IDE on Ubuntu (snap package).

I also have the same problem. Apparently the snap version doesn't work.

I uniinstalled the deb version but it didn't solved anything, I also removed the snap version and downloaded the ide from the arduino website, put it in a tools folder inside my home folder and it work like a charm...

I had the same problem with Ubuntu 16.04 when I installed Arduino IDE from the "Ubuntu Software"-app. Cryptic error-message when compiling, and permission issue when trying to open "Serial Monitor".

I removed the app from within "Ubuntu Software", downloaded latest version manually from Arduino website. Created a "Tools"-folder in my home-directory and placed the un-zipped "arduino-1.8.1" folder there. Ran installer from terminal as the instructions said. Everything works fine!

Best regards,
Roger Bratseth
Norway