Error: fenics-dolfinx requires GCC-9 or newer for improved C++17 support but gcc version 10.2.1 in my system

I follow the guide on github step by step,here are the commands:

git clone https://github.com/spack/spack.git
. ./spack/share/spack/setup-env.sh
spack env create fenicsx-env
spack env activate fenicsx-env
spack add py-fenics-dolfinx cflags="-O3" fflags="-O3"
spack install

And the output of spack concretize is the same error:

[root@localhost jzz]# spack concretize
==> Error: fenics-dolfinx requires GCC-9 or newer for improved C++17 support