Ubuntu16.04安装gcc7

Ubuntu16.04安装gcc7

依次执行:

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update 
sudo apt-get install gcc-7


然后是配置指令,优先级可以自己定:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100
sudo update-alternatives --config gcc

然后:
gcc -v
发布了386 篇原创文章 · 获赞 592 · 访问量 72万+

猜你喜欢

转载自blog.csdn.net/wsp_1138886114/article/details/103817311