You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WSL2中Ubuntu 20.04编译mgconsole时出现<concepts>缺失错误

编译mgconsole时出现头文件找不到的错误

按照官方步骤操作mgconsole编译:

  • 克隆仓库后执行依赖安装命令:apt-get install -y git cmake make gcc g++ libssl-dev
  • 切换至构建目录后运行:cmake -DCMAKE_BUILD_TYPE=Release .. 和 make

编译在构建utils目标时终止,核心错误为找不到<concepts>头文件,终端输出末尾内容如下:

Scanning dependencies of target gflags_static
[ 62%] Building CXX object CMakeFiles/gflags_static.dir/src/gflags.cc.o
[ 75%] Building CXX object CMakeFiles/gflags_static.dir/src/gflags_reporting.cc.o
[ 87%] Building CXX object CMakeFiles/gflags_static.dir/src/gflags_completions.cc.o
[100%] Linking CXX static library lib/libgflags.a
[100%] Built target gflags_static
[ 67%] Performing install step for 'gflags-proj'
[ 50%] Built target gflags_nothreads_static
[100%] Built target gflags_static
Install the project...
-- Install configuration: "Release"
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/lib/libgflags.a
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/lib/libgflags_nothreads.a
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/include/gflags/gflags.h
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/include/gflags/gflags_declare.h
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/include/gflags/gflags_completions.h
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/include/gflags/gflags_gflags.h
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/lib/cmake/gflags/gflags-config.cmake
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/lib/cmake/gflags/gflags-config-version.cmake
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/lib/cmake/gflags/gflags-targets.cmake
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/lib/cmake/gflags/gflags-targets-release.cmake
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/lib/cmake/gflags/gflags-nonamespace-targets.cmake
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/lib/cmake/gflags/gflags-nonamespace-targets-release.cmake
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/bin/gflags_completions.sh
-- Installing: /home/norman/temp/build/mgconsole/src/gflags/lib/pkgconfig/gflags.pc
-- Installing: /root/.cmake/packages/gflags/a516f790dacff7126131e99de4429e97
[ 70%] Completed 'gflags-proj'
[ 70%] Built target gflags-proj
Scanning dependencies of target utils
[ 73%] Building CXX object src/utils/CMakeFiles/utils.dir/utils.cpp.o
[ 76%] Building CXX object src/utils/CMakeFiles/utils.dir/thread_pool.cpp.o
In file included from /home/norman/temp/build/mgconsole/src/utils/thread_pool.hpp:25,
                 from /home/norman/temp/build/mgconsole/src/utils/thread_pool.cpp:16:
/home/norman/temp/build/mgconsole/src/utils/synchronized.hpp:18:10: fatal error: concepts: No such file or directory
   18 | #include &lt;concepts&gt;
      |          ^~~~~~~~~~
compilation terminated.
make[2]: *** [src/utils/CMakeFiles/utils.dir/build.make:76: src/utils/CMakeFiles/utils.dir/thread_pool.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1029: src/utils/CMakeFiles/utils.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

内容的提问来源于stack exchange,提问作者NoLANman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 06:14:53