cmake安装

一、下载

下载地址:https://cmake.org/files/

curl -OL curl -OL https://ghproxy.com/https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0.tar.gz
curl -OL https://ghproxy.com/https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0-SHA-256.txt
sha256sum -c --ignore-missing cmake-3.18.0-SHA-256.txt #会显示cmake-3.18.0.tar.gz: OK
tar -xzvf cmake-3.18.0.tar.gz

二、编译

cd cmake-3.18.0
./bootstrap

报错:



解决方法:

sudo apt install gcc

又报错:



解决方法:

sudo apt-get install build-essential

又报错:



解决办法:

sudo apt-get install libssl-dev

再继续:

./bootstrap
make
make install

报错:



解决办法:

sudo make install

三、配置环境变量

cd bin
pwd
cd
vim .bashrc
source .bashrc
cmake --version
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容