Wont compile "Blink" example

Hi there. Sorry for another thread but I can’t seem to find the solution. I have installed IDE in Ubunut and can’t get it to compile anything. Here’s the error code

<Arduino: 1.6.10 (Linux), Board: “Arduino/Genuino Uno”

/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/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.

Any help would be great.

Thanks

Here's all of it

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

/snap/arduino-mhall119/3/arduino-builder -dump-prefs -logger=machine -hardware "/snap/arduino-mhall119/3/hardware" -hardware "/home/josh/snap/arduino-mhall119/3/.arduino15/packages" -tools "/snap/arduino-mhall119/3/tools-builder" -tools "/snap/arduino-mhall119/3/hardware/tools/avr" -tools "/home/josh/snap/arduino-mhall119/3/.arduino15/packages" -built-in-libraries "/snap/arduino-mhall119/3/libraries" -libraries "/home/josh/snap/arduino-mhall119/3/Arduino/libraries" -fqbn=arduino:avr:uno -ide-version=10610 -build-path "/tmp/build401f858794d6b602542c296bf1a13769.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "/snap/arduino-mhall119/3/examples/01.Basics/Blink/Blink.ino"
/snap/arduino-mhall119/3/arduino-builder -compile -logger=machine -hardware "/snap/arduino-mhall119/3/hardware" -hardware "/home/josh/snap/arduino-mhall119/3/.arduino15/packages" -tools "/snap/arduino-mhall119/3/tools-builder" -tools "/snap/arduino-mhall119/3/hardware/tools/avr" -tools "/home/josh/snap/arduino-mhall119/3/.arduino15/packages" -built-in-libraries "/snap/arduino-mhall119/3/libraries" -libraries "/home/josh/snap/arduino-mhall119/3/Arduino/libraries" -fqbn=arduino:avr:uno -ide-version=10610 -build-path "/tmp/build401f858794d6b602542c296bf1a13769.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "/snap/arduino-mhall119/3/examples/01.Basics/Blink/Blink.ino"
Using board 'uno' from platform in folder: /home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20
Using core 'arduino' from platform in folder: /home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20
Detecting libraries used...
"/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20/cores/arduino" "-I/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20/variants/standard" "/tmp/build401f858794d6b602542c296bf1a13769.tmp/sketch/Blink.ino.cpp" -o "/dev/null"
"/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20/cores/arduino" "-I/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20/variants/standard" "/tmp/build401f858794d6b602542c296bf1a13769.tmp/sketch/Blink.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20/cores/arduino" "-I/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20/variants/standard" "/tmp/build401f858794d6b602542c296bf1a13769.tmp/sketch/Blink.ino.cpp" -o "/tmp/build401f858794d6b602542c296bf1a13769.tmp/preproc/ctags_target_for_gcc_minus_e.cpp"
"/snap/arduino-mhall119/3/tools-builder/ctags/5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/build401f858794d6b602542c296bf1a13769.tmp/preproc/ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20/cores/arduino" "-I/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/hardware/avr/1.6.20/variants/standard" "/tmp/build401f858794d6b602542c296bf1a13769.tmp/sketch/Blink.ino.cpp" -o "/tmp/build401f858794d6b602542c296bf1a13769.tmp/sketch/Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/wiring_pulse.S.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/WInterrupts.c.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/hooks.c.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/wiring.c.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/wiring_analog.c.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/wiring_digital.c.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/wiring_pulse.c.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/wiring_shift.c.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/CDC.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/HardwareSerial.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/HardwareSerial0.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/HardwareSerial1.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/HardwareSerial2.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/HardwareSerial3.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/IPAddress.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/PluggableUSB.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/Print.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/Stream.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/Tone.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/USBCore.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/WMath.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/WString.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/abi.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/main.cpp.o
Using previously compiled file: /tmp/build401f858794d6b602542c296bf1a13769.tmp/core/new.cpp.o
"/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc-ar" rcs "/tmp/build401f858794d6b602542c296bf1a13769.tmp/core/core.a" "/tmp/build401f858794d6b602542c296bf1a13769.tmp/core/wiring_pulse.S.o"
/home/josh/snap/arduino-mhall119/3/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/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.

Looks like a corrupted install of Arduino. I would remove and try to reinstall.

Don't use the one from the repos. Download it from this site. https://www.arduino.cc/en/Main/Software under Download the Arduino IDE.

It looks like you used this "arduino-mhall119" "Snap" package to install the Arduino IDE. You should never install the Arduino IDE using any sort of package manager because you end up with a modified version that some random screwed around with and/or an outdated version. Instead always download the official IDE from the link Delta_G posted.

Thanks for the help. Worked right away.