ubuntu 16.04 更新 gcc/g++ 4.9.2
ubuntu 16.04 更新 gcc/g++ 4.9.2 转载 2016年10月12日 16:44:13 标签:ubuntu /g++ /gcc 3419 [html] view plain copy sudo dpkg -l g++ 最近在学C++primer ,里面很多是C++11,所以想决定更新一下gcc/g++的版本。 查看g++版本的命令是: 更新g++/gcc版本命令是: [cpp] view plain copy sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.9 sudo apt-get install g++-4.9 装完后,各版本就共存了。不过有一个问题,必须使用g++-4.9,如果直接用g++会运行4.8版本的,非常麻烦。 所以需要改一下/usr/bin/下的链接。 sudo su cd ../../usr/bin ln -s /usr/bin/g++-4.9 /usr/bin/g++ -f ln -s /usr/bin/gcc-4.9 /usr/bin/gcc -f 这样就可以了。以后直接用g++就可以了。
_________________________________________________________________________________________________________________________________________________
每一个不曾起舞的日子,都是对生命的辜负。
But it is the same with man as with the tree. The more he seeks to rise into the height and light, the more vigorously do his roots struggle earthward, downward, into the dark, the deep - into evil.
其实人跟树是一样的,越是向往高处的阳光,它的根就越要伸向黑暗的地底。----尼采
每一个不曾起舞的日子,都是对生命的辜负。
But it is the same with man as with the tree. The more he seeks to rise into the height and light, the more vigorously do his roots struggle earthward, downward, into the dark, the deep - into evil.
其实人跟树是一样的,越是向往高处的阳光,它的根就越要伸向黑暗的地底。----尼采

浙公网安备 33010602011771号