如题, CentOS编译装置时可能提醒以下谬误, 须要降级GCC版本

configure: error: Your compiler does not have the necessary C++17 support! Cannot proceed.

执行命令:

yum install -y centos-release-sclyum install devtoolset-8-gcc*

实现后执行:

切换以后会话中gcc版本为8

scl enable devtoolset-8 bash

或者:

间接替换旧的gcc

mv /usr/bin/gcc /usr/bin/gcc-4.8.5ln -s /opt/rh/devtoolset-8/root/bin/gcc /usr/bin/gccmv /usr/bin/g++ /usr/bin/g++-4.8.5ln -s /opt/rh/devtoolset-8/root/bin/g++ /usr/bin/g++

执行命令查看版本:

gcc -v