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

猜你喜欢

转载自www.cnblogs.com/kaishirenshi/p/9778325.html
6.3