gcc6.3的安装

author:headsen  chen

date: 2018-10-12  15:11:35

 

1,环境:centos7.3 ,64位,内核 3.10

 2,安装过程

#!/bin/bash
yum install mpfr -y
yum install gmp -y
yum install *mpc* -y
yum install glibc-static libstdc++-static -y
yum -y install gcc gcc-c++
cd /mnt
wget http://mirrors.concertpass.com/gcc/releases/gcc-6.3.0/gcc-6.3.0.tar.gz
tar fx gcc-6.3.0.tar.gz 
cd  gcc-6.3.0/
./contrib/download_prerequisites 
mkdir gcc-build-6.3.0.
./configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
make -j4
make install

#配置环境变量
mv /usr/bin/gcc /usr/bin/gcc4.4.7
ln -s /usr/local/bin/gcc /usr/bin/gcc
mv /usr/bin/g++ /usr/bin/g++4.4.7
ln -s /usr/local/bin/g++ /usr/bin/g++
mv /usr/bin/cc /usr/bin/cc4.4.7
ln -s /usr/local/bin/cc /usr/bin/cc
mv /usr/bin/c++ /usr/bin/c++4.4.7
ln -s /usr/local/bin/c++ /usr/bin/c++
gcc --version

 

posted @ 2018-10-12 15:22  开始认识  阅读(2912)  评论(0编辑  收藏  举报