Ubuntu 安装cmake


Ubuntu 安装 cmake

官网

https://cmake.org

下载地址

https://cmake.org/download/

参考文档

-《ubuntu下更新cmake版本

什么时 cmake ?

官网:

CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.

安装

安装依赖

sudo apt install build-essential libssl-dev

1.下载 cmake-3.22.1.tar.gz

image

2. 解压 cmake-3.22.1.tar.gz

tar -zxvf cmake-3.22.1.tar.gz

3. 构建

cd  cmake-3.22.1
./configure --prefix=/usr/local

image

4. 编译安装

make
sudo make install

image

5.将命令脚本软链到 /usr/bin/,供全局使用

命令:

sudo ln -s /usr/local/bin/* /usr/bin/

6.验证

查看当前版本:

cmake --version

image

至此,安装完成。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM