Skip to content

Instantly share code, notes, and snippets.

@sandyUni
Forked from huacnlee/upgrade-gcc-4.9.sh
Last active November 20, 2018 01:43
Show Gist options
  • Save sandyUni/2065797aefa628c42f3e804108e148ea to your computer and use it in GitHub Desktop.
Save sandyUni/2065797aefa628c42f3e804108e148ea to your computer and use it in GitHub Desktop.
Upgrade GCC 4.9 on Ubuntu Server
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
# if you are embeded arm system, try use the following states
# sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-4.9 60 --slave /usr/bin/arm-linux-gnueabihf-g++ arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++-4.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment