安装 cmake 3.17 失败,CMake 很可能未正确安装

安装 cmake 3.17 失败,CMake 很可能未正确安装

Ubuntu 18.04 以前的 cmake 版本 3.10.2

在我使用sudo make ,sudo make install,and安装 cmake 之后cmake --version

(base) lzw@resplendent-star:~/3d_lib/cmake-3.17.1$ cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.10
cmake version 3.10.2

答案1

可以确认 ubuntu 18.04 更新 cmake 时cmake-3.17.2出现相同错误https://cmake.org/download/

cd $CMAKE_DOWNLOAD_PATH
./configure
make
sudo make install

结果是

def@etho:~/xenium/xenium/build$ CC=gcc-8 CXX=g++-8 cmake ..

CMake Error: Could not find CMAKE_ROOT !!!

CMake has most likely not been installed correctly.

Modules directory not found in
/usr/local/share/cmake-3.5

CMake Error: Error executing cmake::LoadCache().
 
Aborting.

这里的答案很有效 - 我使用了 DM LOWE 的最后一条评论。不要忘记为你的 rc 提供资源

CMake 错误:找不到 CMAKE_ROOT?

相关内容