wazuh通过source code编译make出现报错 c++: error: unrecognized command line option ‘-std=c++14’

我想在服务器上通过编译wazuh源码来运行agent,我参考的是官网上的安装步骤https://documentation.wazuh.com/current/installation-guide/more-installation-alternatives/wazuh-from-sources/wazuh-agent/index.html。但是当我运行最后一步./install.sh之后出现以下错误:
运行环境
- OS:              CentOS7.9

- Wazuh version:   Wazuh4.2.5

- gcc version:     gcc (GCC) 10.2.0

- g++ version:     g++ (GCC) 10.2.0

- cmake version:   cmake version 3.18.3

- Install type:    Agent

- Install method:  Sources

报错信息
CC external/cJSON/cJSON.o
LINK external/cJSON/libcjson.a
RANLIB external/cJSON/libcjson.a
checkmodule -M -m -o selinux/wazuh.mod selinux/wazuh.te
checkmodule: loading policy configuration from selinux/wazuh.te
checkmodule: policy configuration loaded
checkmodule: writing binary representation (version 19) to selinux/wazuh.mod
semodule_package -o selinux/wazuh.pp -m selinux/wazuh.mod
make build_sysinfo build_shared_modules build_syscollector
make[1]: Entering directory /root/wazuh-4.2.5/src' CC libwazuhext.so cd data_provider/ && mkdir -p build && cd build && cmake .. && make -- The C compiler identification is GNU 10.2.0 -- The CXX compiler identification is GNU 4.8.5 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /root/wazuh-4.2.5/src/data_provider/build make[2]: Entering directory /root/wazuh-4.2.5/src/data_provider/build'
make[3]: Entering directory /root/wazuh-4.2.5/src/data_provider/build' make[4]: Entering directory /root/wazuh-4.2.5/src/data_provider/build'
Scanning dependencies of target sysinfo
make[4]: Leaving directory /root/wazuh-4.2.5/src/data_provider/build' make[4]: Entering directory /root/wazuh-4.2.5/src/data_provider/build'
[ 14%] Building CXX object CMakeFiles/sysinfo.dir/src/network/networkInterfaceLinux.cpp.o
c++: error: unrecognized command line option ‘-std=c++14’
make[4]: *** [CMakeFiles/sysinfo.dir/src/network/networkInterfaceLinux.cpp.o] Error 1
make[4]: Leaving directory /root/wazuh-4.2.5/src/data_provider/build' make[3]: *** [CMakeFiles/sysinfo.dir/all] Error 2 make[3]: Leaving directory /root/wazuh-4.2.5/src/data_provider/build'
make[2]: *** [all] Error 2
make[2]: Leaving directory /root/wazuh-4.2.5/src/data_provider/build' make[1]: *** [build_sysinfo] Error 2 make[1]: Leaving directory /root/wazuh-4.2.5/src'
make: *** [agent] Error 2 


我该怎么办呢xdm

xdm问题已经解决了,详情可以参考我的git:https://github.com/wazuh/wazuh/issues/11104