centos安装cmake

一、下载cmake二进制包:https://cmake.org/files/v3.17/centos

二、移到centos中,并解压:bash

tar -zxvf cmake-3.17.0-rc1-Linux-x86_64.tar.gz

三、解压将安装移到想要的路径下:ui

mv cmake-3.17.0-rc1-Linux-x86_64 /usr/local/cmake

四、修改环境变量code

vi /etc/profile

在末尾加上:get

PATH=/usr/local/cmake/bin:$PATH
export PATH

五、使环境变量生效it

source /etc/profile

六、检查是否安装成功io

cmake --version

显示以下:class

cmake version 3.17.0-rc1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
相关文章
相关标签/搜索