How to Install GCC 4.8 via PPA in Ubuntu 12.04, 13.04, 10.04

version `GLIBCXX_3.4.18' not found on Ubuntu 12.04


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:

 
原文链接: http://ubuntuhandbook.org/index.php/2013/08/install-gcc-4-8-via-ppa-in-ubuntu-12-04-13-04/
 
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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值