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/

gcc 升级方法的更多相关文章

  1. gcc升级方法

    https://www.cppfans.org/1719.html 默认链接到 /usr/local/bin/gcc,需要链接一下,替换默认的低版本 ln -s /usr/local/bin/gcc ...

  2. oracle 11g RAC 补丁升级方法

    一.自动升级方法 使用auto方式在两节点分别进行PSU的安装,安装PSU前注意更新opatch工具至PSU所要求版本,p22191577补丁包括GI和DB,分别执行即可. 两节点分别grid用户执行 ...

  3. Android Studio下载及离线升级方法

    由于众所周知的原因,android官网无法访问,所以我们要用到翻.墙.工具,我用的是自.由.门,大家自行搜索下载. android studio下载地址: https://dl.google.com/ ...

  4. gitlab升级方法

    gitlab升级方法:国内网络环境推荐方法二方法一:官网的升级方式 (1)停止git服务 gitlab-ctl stop unicorn gitlab-ctl stop sidekiq gitlab- ...

  5. MySQL 升级方法指南大全

    原文:MySQL 升级方法指南大全 通常,从一个发布版本升级到另一个版本时,我们建议按照顺序来升级版本.例如,想要升级 MySQL 3.23 时,先升级到 MySQL 4.0,而不是直接升级到 MyS ...

  6. JEECG 3.7.8 新版表单校验提示风格使用&升级方法(validform 新风格漂亮,布局简单)

    JEECG 表单校验采用的是validform,默认的校验提示需要占用页面布局,提示效果较传统.jeecg这个自定义的校验提示风格,不占用页面布局,提示效果也更美观,简单易用,让表单看起来更漂亮!!! ...

  7. CentOS 6下gcc升级的操作记录(由默认的4.4.7升级到6.4.0版本)

    机房一台centos6.9机器部署了jenkins发布系统,开发人员在用node编译js,发现依赖的gcc版本低了,故需要将gcc升级到高版本(至少5.0版本以上),这里选择升级到6.4.0版本,下面 ...

  8. 查看win10版本方法,及win10升级方法

    点击左下角开始图标. 找到并点击左下方设置(齿轮形的图案). 点左上方的系统(笔记本电脑图案). 在左下方 点击关于.找到windows规格.   带大家解读Windows10的规格: 专业版功能较多 ...

  9. mac下python2.x和python3.x的安装方法和升级方法/卸载

    一.首先问个问题,我们为什么要升级python2.x或者python3.x的版本? 一个是低版本会有些bug:或者功能问题,或者安全问题等,另外高版本会引进一些新的功能,也会废弃一些老的功能. 可以通 ...

随机推荐

  1. AOP注解式拦截

    1. 自己定义的拦截注解 package com.spring.aop; import java.lang.annotation.Documented; import java.lang.annota ...

  2. 机械硬盘运行VMWare虚拟机太卡的解决办法

    VMWare有个运行机制是:在硬盘生成内存的镜像文件以降低内存的使用量,而这个是可以配置的,如果你的内存足够大的话,就可以不使用这个内存镜像,从而提高运行效率:配置方法如下: 1.单个虚拟机的配置,修 ...

  3. 两个VLC实现播放串流测试

    实现原理: 一个VLC打开视频文件发布串流(格式HTTP.RTP.RTSP等),另一个VLC打开串流播放 发布串流步骤: 1.菜单“媒体”->“流”,先添加视频文件.选择“串流”,如下图: 2. ...

  4. LeetCode Count Binary Substrings

    原题链接在这里:https://leetcode.com/problems/count-binary-substrings/description/ 题目: Give a string s, coun ...

  5. 「LOJ#10051」「一本通 2.3 例 3」Nikitosh 和异或(Trie

    题目描述 原题来自:CODECHEF September Challenge 2015 REBXOR 1​​≤r​1​​<l​2​​≤r​2​​≤N,x⨁yx\bigoplus yx⨁y 表示 ...

  6. Yii 常用命令

    一.Yii的Active Recorder包装了很多. 特别是把SQL中 把where,order,limit,IN/not IN,like等常用短句都包含进CDbCriteria这个类中去,这样整个 ...

  7. 纯JS实现房贷利率报表对比

    最近朋友买房,想计算下自己的房贷的还款情况,自己正好周末没事,从网上找来点代码修改,也算是对自己技术的巩固吧. 目前这个还只是个初级版本,暂时可以在PC上正常访问,将来会一步一步的把相继功能都加上的, ...

  8. [转] AS3地图拼接与战争迷雾的实现

    在开发游戏的过程中,特别是地图编辑器中,需要利用最少的资源,实现最丰富的地形地貌.虽然现在众多的RPG开始使用整图,但是我们偶尔还是需要能够让玩家自己编辑地图,或者其他需要自动进行地图构建的功能.另外 ...

  9. 程序员转项目管理之考证PMP

    转行项目经历是IT人的出路之一,最近身边有好几个同事都在备考PMP,从个人未来职业发展来看,如果你有将来转行项目管理的想法,应该去尝试考一下PMP. PMP(Project Management Pr ...

  10. java基础练习。。replaceall

    总结:方法不是别人告诉你的.再与你的手 package com.bc; public class gdfk { public static void main(String[] args) { Str ...