Linux升级gcc

  1. 作者QQ:67065435 QQ群:821635552

  2. 目前低于2G内存的服务器,安装中会因为内存不足报错

  3. 安装前的准备

    cd /root
    
    # 下载gcc-5.3.0并解压
    wget http://ftp.gnu.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.gz
    tar -zxvf gcc-5.3.0.tar.gz
    
    # 进入gcc-5.3.0目录,下载依赖的插件
    cd /root/gcc-5.3.0
    ./contrib/download_prerequisites
    
    # 移动所有插件到/root/gcc-tool目录
    mkdir /root/gcc-tool
    mv /root/gcc-5.3.0/*.tar.* /root/gcc-tool/
    
    # 解压所有插件
    cd /root/gcc-tool/
    tar -xf /root/gcc-tool/gmp-4.3.2.tar.bz2
    tar -xf /root/gcc-tool/isl-0.14.tar.bz2
    tar -xf /root/gcc-tool/mpc-0.8.1.tar.gz
    tar -xf /root/gcc-tool/mpfr-2.4.2.tar.bz2
    
    # 安装所有插件
    cd /root/gcc-tool/gmp-4.3.2
    ./configure
    make
    make install
    
    cd /root/gcc-tool/isl-0.14
    ./configure
    make
    make install
    
    cd /root/gcc-tool/mpfr-2.4.2
    ./configure
    make
    make install
    
    cd /root/gcc-tool/mpc-0.8.1
    ./configure
    make
    make install
    
  4. 开始安装

    cd /root/gcc-5.3.0
    
    ./configure \
    --enable-checking=release \
    --enable-languages=c,c++ \
    --disable-multilib \
    
    make
    make install
    
Copyright © 豆包嘿嘿~ 2012-∞ 冀ICP备17033181号 all right reserved,powered by Gitbook修订: 2012-12-31 12:00:00

results matching ""

    No results matching ""