歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> ubuntu 12.04 ppa安裝g++4.8

ubuntu 12.04 ppa安裝g++4.8

日期:2017/3/3 12:39:17   编辑:Linux技術

為了支持C++11,需要將默認的g++4.6升級到4.8,現在記錄一下.

sudo add-apt-repository ppa:ubuntu-toolchain-r/test     sudo apt-get update; 
sudo apt-get install gcc-4.8 g++-4.8   
sudo update-alternatives --remove-all gcc 
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
sudo update-alternatives --config gcc
sudo update-alternatives --config g++

Copyright © Linux教程網 All Rights Reserved