歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 13.04 安裝 GCC 4.8.1

Ubuntu 13.04 安裝 GCC 4.8.1

日期:2017/2/28 14:45:03   编辑:Linux教程

終於有了完整實現C++11的GCC 4.8.1.

給自己的系統升級吧。

下面的步驟可以在Ubuntu 13.04下安裝GCC 4.8.1,

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo apt-get install gcc-4.8
sudo apt-get install g++-4.8
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++

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade

最後用gcc --version檢查一下,果然是4.8.1.

gcc --version
gcc (Ubuntu 4.8.1-2ubuntu1~13.04) 4.8.1
Copyright (C) 2013 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.

Copyright © Linux教程網 All Rights Reserved