Cmake 3.17 无法运行 bootstrap,因为**致命错误:config.h:没有此文件或目录**

Cmake 3.17 无法运行 bootstrap,因为**致命错误:config.h:没有此文件或目录**

请注意:我在 Win10 上使用 WSL Ubuntu 应用程序。

我从以下网址下载了 CMake 3.17.1 Linux/Unix 源代码CMake.org | 下载并按照说明进行操作CMake.org | 安装./bootstrap从 WSL Ubuntu App 运行命令,遇到以下错误:

CMake 3.17.1, Copyright 2000-2020 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++
Makefile processor on this system is: make
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has stl wstring
g++ has <ext/stdio_filebuf.h>
---------------------------------------------
g++        -DCMAKE_BOOTSTRAP    -DCMake_HAVE_CXX_MAKE_UNIQUE=1   -I/mnt/d/cmake/cmake-3.17.1/Bootstrap.cmk   -I/mnt/d/cmake/cmake-3.17.1/Source   -I/mnt/d/cmake/cmake-3.17.1/Source/LexerParser   -I/mnt/d/cmake/cmake-3.17.1/Utilities/std   -I/mnt/d/cmake/cmake-3.17.1/Utilities  -c /mnt/d/cmake/cmake-3.17.1/Source/cmMakefile.cxx -o cmMakefile.o
In file included from /mnt/d/cmake/cmake-3.17.1/Utilities/cmjsoncpp/include/json/value.h:10:0,
                 from /mnt/d/cmake/cmake-3.17.1/Utilities/cm_jsoncpp_value.h:11,
                 from /mnt/d/cmake/cmake-3.17.1/Source/cmMakefile.cxx:25:
/mnt/d/cmake/cmake-3.17.1/Utilities/cmjsoncpp/include/json/forwards.h:10:10: fatal error: config.h: No such file or directory
 #include "config.h"
          ^~~~~~~~~~
compilation terminated.
Makefile:268: recipe for target 'cmMakefile.o' failed
make: *** [cmMakefile.o] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make

我不明白为什么这个会丢失,因为我是从官方经销商处下载的...有办法解决这个问题吗?

附加信息:

g++ --version  
g++ (Ubuntu 9.3.0-11ubuntu0~18.04.1) 9.3.0

gcc --version
gcc (Ubuntu 9.3.0-11ubuntu0~18.04.1) 9.3.0

答案1

根据 Daniel B 的评论,我再次使用 wget 和下载链接通过 Ubuntu 终端下载了它,解压后再次按照安装说明进行操作。成功了。

相关内容