Skip to content

Instantly share code, notes, and snippets.

@fpagyu
Created January 14, 2019 09:11
Show Gist options
  • Save fpagyu/205fcb368cc0501ee8c339cb245a4359 to your computer and use it in GitHub Desktop.
Save fpagyu/205fcb368cc0501ee8c339cb245a4359 to your computer and use it in GitHub Desktop.
在较早的ubuntu版本中安装gcc6
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
sudo apt-get update && \
sudo apt-get install gcc-6 g++-6 -y && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
gcc -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment