下载:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-8
sudo apt-get install g++-8
配置:将gcc8,g++8作为默认选项
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100
sudo update-alternatives --config gcc
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100
sudo update-alternatives --config g++
标签:ubuntu16.04,gcc,++,sudo,alternatives,update,apt,gcc8 From: https://www.cnblogs.com/wuyun--wy/p/16977352.html