【深度学习】ubuntu系统指定gcc版本并调整优先级
sudo apt install build-essentialgcc --version (查看gcc版本)可以看到我的gcc版本是4.8.5安装最新版gcc9sudo apt install software-properties-commonsudo add-apt-repository ppa:ubuntu-toolchain-r/testsudo apt install gcc-9 g+
·
sudo apt install build-essential
gcc --version (查看gcc版本)
可以看到我的gcc版本是4.8.5

安装最新版gcc9
sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt install gcc-9 g++-9
查看各个gcc版本的优先级,分数越高优先级越高
sudo update-alternatives --config gcc

更改优先级(可以用以下命令,将你想要的gcc版本优先级改为最高)
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100
更多推荐

所有评论(0)