美文网首页
Centos7 编译安装 CMake 3.16.2

Centos7 编译安装 CMake 3.16.2

作者: SuSuSoo | 来源:发表于2021-07-14 03:17 被阅读0次

    CentOS 7 源码安装 CMake 3.16.2 最新稳定版。解决 cmake: command not found 问题。

    1、准备编译环境

    yum -y install gcc gcc-c++ openssl openssl-devel tar
    

    2、获取源码,并解压

    wget https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz
    tar -zxf cmake-3.16.2.tar.gz
    cd cmake-3.16.2
    

    备用下载地址:https://down.24kplus.com/linux/cmake/cmake-3.16.2.tar.gz

    3、编译安装

    ./bootstrap --prefix=/usr --datadir=share/cmake --docdir=doc/cmake && make
    sudo make install
    

    4、检查是否正确安装

    cmake --version
    

    cmake version 3.16.2

    CMake suite maintained and supported by Kitware (kitware.com/cmake).


    相关文章

      网友评论

          本文标题:Centos7 编译安装 CMake 3.16.2

          本文链接:https://www.haomeiwen.com/subject/axvepltx.html