如何在Linux上正确安装cmake? (CMAKE_ROOT错误)

时间:2019-03-06 17:46:12

标签: linux cmake centos rhel

我尝试使用以下方式将cmake安装到RHEL linux实例:

mkdir cmake
cd cmake
wget https://cmake.org/files/v3.13/cmake-3.13.3.tar.gz
tar -xzvf cmake-3.13.3.tar.gz
cd cmake-3.13.3
./bootstrap
    # -- Build files have been written to: /home/ec2-user/cmake/cmake-3.13.3
    # ---------------------------------------------
    # CMake has bootstrapped.  Now run gmake.
gmake
    # [100%] Built target foo
sudo gmake install

测试和错误:

    # 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.13
    # CMake Error: Error executing cmake::LoadCache(). Aborting.

正确的方法是什么?

0 个答案:

没有答案