Ubuntu16.04 安装g++6

1.安装gcc-6:

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-snapshot -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

  

原文地址:https://www.cnblogs.com/leoking01/p/13669290.html