CentOS更新gcc到5.3.0

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

  2. 安装前的准备

     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
    
  3. 开始安装

     cd /root/gcc-5.3.0
    
     ./configure \
     --enable-checking=release \
     --enable-languages=c,c++ \
     --disable-multilib \
    
     make
     make install
    
@耿志环 2012-∞ 冀ICP备17033181号, powered by Gitbook修订: 2018-05-30 16:49:59

results matching ""

    No results matching ""