一、原因
这是一个gcc版本导致的问题。Centos7的默认gcc版本为4.8.5,可通过gcc --version
命令进行查询。
升级gcc至7.3版本可解决该问题
二、解决
yum -y install centos-release-scl
yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
scl enable devtoolset-7 bash
如果要长期使用gcc7.3的话
echo "source /opt/rh/devtoolset-7/enable" >>~/.bashrc
source ~/.bashrc
- unrecognized CentOS7 command CentOS optionunrecognized centos7 command centos centos7 command centos found wno-address-of-packed-member unrecognized command unrecognized version版本option unrecognized arguments思路command 命令command方法centos autoconf command centos found centos7 centos7 centos centos7 centos docker