1、安装gcc-8.3.1
yum install -y centos-release-scl
yum install -y devtoolset-10-gcc* devtoolset-10-libstdc++*
2、安装libstdc+±10.2.1
rpm -ivh http://mirror.ghettoforge.org/distributions/gf/el/7/gf/x86_64/gcc10-libstdc++-10.2.1-7.gf.el7.x86_64.rpm
3、将gcc链接到/usr/bin
mv /usr/bin/gcc /usr/bin/gcc-4.8.5
ln -s /opt/rh/devtoolset-10/root/bin/gcc /usr/bin/gcc
4、将libstc++.so改为10.2.1
cp /opt/gcc-10.2.1/usr/lib64/libstdc++.so.6.0.28 /usr/lib64/
rm -f /usr/bin/libstdc++.so.6
ln -s /usr/lib64/libstdc++.so.6.0.28 /usr/lib64/libstdc++.so.6
4、安装相关依赖
yum -y install mesa-libGL-devel mesa-libGLU-devel freeglut-devel