I've recently upgraded Nodejs from 0.13 to 6.9 and I started getting some errors when running my nodejs app, I googled around, managed to fix some errors and new ones appeared, I ended up deleting the
Finally solved this, I'll leave the solution here for whomever runs into the same problem.
Here's what the problem was, Unbuntu 12.04 only has
gcc 4.6.3 in the official repository, but C++11 is only supported from 4.8.1, therefore you need to install 4.8 from a different PPA:
sudo apt-get install python-software-properties sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.8 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
Now this alone did not fix the problem since it seems
g++ instead of
gcc so just do the same for
sudo apt-get install g++-4.8 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
sudo npm install should run without problems.