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).
相關文章
相關標籤/搜索