SITL Build Failure on Linux

Hi all,

I am an absolute beginner when it comes to Linux. I just installed VirtualBox in order to run Ubuntu 14.04 and it seems to be working fine.

I then followed the steps for building SITL according to the documentation and referenced this video tutorial as well. The last step I successfully completed was inputting . ~/.bashrc. When I try executing the next command inside the arducopter directory, sim_vehicle.py -w, I get a long error message and I think this is the most relevant part:

[331/688] Compiling arducopter/arducopter.cpp
cc1plus: error: unrecognized command line option '-std=gnu++11'
compilation terminated due to -Wfatal-errors.

According to the YouTube tutorial I linked above, that [331/688] should continue increasing in value until complete, resulting in a successful build. Again, I am an absolute beginner in Linux and I am hoping there is a simple fix for this that I am overlooking due to inexperience. Any help is greatly appreciated.

Please let me know what other information I should provide.

Cheers.

weird it looks you miss the right toolchain…
. Try “sudo apt install build-essential g++” and “sudo apt update & & sudo apt upgrade & & sudo apt full-upgrade” to update everything (could be a little long to download everything)

Hey khancyr, thanks for the reply. I ran the following commands (which took around 15 minutes in total) but still receive the same error:

sudo apt-get install build essential g++
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

[FIXED]

I eventually updated my version of Linux from 14.04 to 14.04 LTS, followed the same steps for setting up SITL according to the documentation and everything worked perfectly.