美文网首页
CentOS7安装cmake3

CentOS7安装cmake3

作者: Jaxh | 来源:发表于2020-09-02 22:00 被阅读0次

    下载源码

    wget https://github.com/Kitware/CMake/releases/download/v3.18.2/cmake-3.18.2.tar.gz
    

    解压

    tar -zxvf cmake-3.18.2.tar.gz
    

    进入cmark的源码目录

    cd cmake-3.18.2
    

    运行bootstrap

    这一步运行时间较长。

    ./bootstrap
    
    # 如果报错 Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
    # 解决方法,安装c++编译器
    yum install -y gcc gcc-c++
    

    运行gmake

    gmake && gmake install
    

    安装完成

    #  查看版本号
    cmake --version
    

    相关文章

      网友评论

          本文标题:CentOS7安装cmake3

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