zoukankan      html  css  js  c++  java
  • gcc 升级方法

    Want GCC 4.8 with c++11 complete feature? Well here’s how to install it in Ubuntu 12.04, Ubuntu 13.04, Ubuntu 12.10 via the PPA.

    The PPA provides both GCC 4.7.3 and GCC 4.8.1 for Ubuntu users. In this tutorial, you can follow below steps to upgrade gcc version in your system.

    1.) Press Ctrl+Alt+T on your keyboard to open terminal. When it opens, run below commands to add the ppa:

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test

    2.) Then install gcc 4.8 and g++ 4.8:

    sudo apt-get update; sudo apt-get install gcc-4.8 g++-4.8

    3.) Once installed, run following commands one by one to use gcc 4.8 instead of previous version.

    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++

    Now you have the gcc 4.8 with c++11 complete feature in your system. Check out by:

    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.

     转自

    Want GCC 4.8 with c++11 complete feature? Well here’s how to install it in Ubuntu 12.04, Ubuntu 13.04, Ubuntu 12.10 via the PPA.

    The PPA provides both GCC 4.7.3 and GCC 4.8.1 for Ubuntu users. In this tutorial, you can follow below steps to upgrade gcc version in your system.

    1.) Press Ctrl+Alt+T on your keyboard to open terminal. When it opens, run below commands to add the ppa:

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test

    2.) Then install gcc 4.8 and g++ 4.8:

    sudo apt-get update; sudo apt-get install gcc-4.8 g++-4.8

    3.) Once installed, run following commands one by one to use gcc 4.8 instead of previous version.

    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++

    Now you have the gcc 4.8 with c++11 complete feature in your system. Check out by:

    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.

     转自http://ubuntuhandbook.org/index.php/2013/08/install-gcc-4-8-via-ppa-in-ubuntu-12-04-13-04/
  • 相关阅读:
    Rsync企业实战之自动异地备份(转)
    Linux启动过程详解 (转)
    Linux系统下修改环境变量PATH路径的三种方法
    linux更改启动级别后,无法启动的问题解决
    MySQLAdmin用法
    mysql toolkit 用法[备忘] (转)
    mysql edit
    MySQL中SSL配置
    mysql ALTER COLUMN MODIFY COLUMN CHANGE COLUMN 区别及用法 (转)
    MySQL 使用mysqld_multi部署单机多实例详细过程 (转)
  • 原文地址:https://www.cnblogs.com/fdd566/p/6408584.html
Copyright © 2011-2022 走看看