Centos升级g++到10.2

下载gcc源码 gcc-10.2.0.tar.gz

解压完进入到源码目录

./contrib/download_prerequisites

mkdir build && cd build

../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib

make -j 32 && make install

编译完的目录在 /usr/local/bin 目录下

修改软链接:

yum remove g++

yum remove gcc

 

 ln -s /usr/local/bin/gcc ./gcc

ln -s /usr/local/bin/g++ ./g++

posted @ 2021-02-08 13:32  HappyCoder_1  阅读(314)  评论(0编辑  收藏  举报