Skip to content

Instantly share code, notes, and snippets.

@SpainTrain
Created September 21, 2015 17:26
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SpainTrain/8022f6d924c6c7624e09 to your computer and use it in GitHub Desktop.
Save SpainTrain/8022f6d924c6c7624e09 to your computer and use it in GitHub Desktop.
CircleCI machine config for node-gyp with Node v4.X
machine:
node:
version: 4.1
pre:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install gcc-4.9 g++-4.9
post:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
@dmtrs
Copy link

dmtrs commented Oct 15, 2015

@SpainTrain you are the hero of the day!

@tonyghita
Copy link

@SpainTrain high five sir! 💯

@jchansen
Copy link

@SpainTrain hero of the day again. Thank you sir!

@chrisfishwood
Copy link

@SpainTrain - Missed the 3 month anniversary by 1 day! Hero of the day again and again! I owe you 1 🍺. Thanks!

@intentionally-left-nil
Copy link

--slave no longer works, try this:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 60 && sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 60 && sudo update-alternatives --set gcc /usr/bin/gcc-4.7 && sudo update-alternatives --set g++ /usr/bin/g++-4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment