我已经通过以下方法在Ubuntu 12.10上下载了g ++ 4.8:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.8
但是当我这样做时:
sudo update-alternatives --config g++
切换g ++版本,它说:
update-alternatives: error: no alternatives for g++.
但是,如果我这样做:
g++ --version
它说:
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
如何将我的g ++ 4.8安装设置为默认g ++?