[关闭]
@guochy2012 2014-07-02T15:30:36.000000Z 字数 714 阅读 1345

升级gcc

未分类


CentOS可以参考下列链接编译源码:
http://www.cnblogs.com/zhangtingkuo/archive/2013/04/06/3002982.html

ubuntu 14.04不用升级

12.04按照下面的步骤升级

首先安装依赖:

sudo apt-get install libgmp-dev
sudo apt-get install libmpfr4 libmpfr-dev
sudo apt-get install libmpc-dev libmpc2
sudo apt-get install libtool
sudo apt-get install m4
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install autoconf

接下来进入到安装gcc4.8.1 的主要步骤:

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

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

之后就可以使用了,通过使用gcc -v 命令可以查看当前gcc的版本

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注