Skip to content

Instantly share code, notes, and snippets.

@jkomyno
Last active September 22, 2016 12:44
Show Gist options
  • Save jkomyno/b1d406e5a84ab872c3b65bc66ca560af to your computer and use it in GitHub Desktop.
Save jkomyno/b1d406e5a84ab872c3b65bc66ca560af to your computer and use it in GitHub Desktop.
Bash script to enable node-gyp build in Debian/Ubuntu etc. This is needed for every modern NodeJS version.
before_install:
- sudo apt-get install python-software-properties
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update
- sudo apt-get install gcc-5 g++-5
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80 --slave /usr/bin/g++ g++ /usr/bin/g++-5
- sudo update-alternatives --set gcc /usr/bin/gcc-5
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-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --config gcc #choose gcc-5 from the list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment