centos7.6 安装gcc

安装gcc

wget ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-8.2.0/gcc-8.2.0.tar.xz
tar -Jxvf gcc-8.2.0.tar.xz 
cd gcc-8.2.0/
./contrib/download_prerequisites
cd .. 
mkdir temp_gcc82 && cd temp_gcc82 
../gcc-8.2.0/configure --prefix=/usr/local/gcc-8.2 --enable-threads=posix --disable-checking --disable-multilib 
make -j 40
make install 

配置环境

sudo vim /etc/profile
export PATH="/usr/local/gcc-8.2/bin:$PATH"

你可能感兴趣的:(linux运维)