cmake 3.24.1
时间: 2023-10-17 13:06:51 浏览: 164
cmake 3.24.1 是一个用于构建、测试和打包软件项目的开源工具。要在Linux上安装cmake 3.24.1,需要执行以下步骤:
1. 首先,安装编译和依赖库。打开终端,并使用以下命令安装所需的编译和依赖库:
```
sudo apt install gcc
sudo apt install make
sudo apt install ninja-build
sudo apt install unzip
sudo apt install libssl-dev
```
2. 下载并解压cmake源码。使用以下命令下载cmake 3.24.1的源码,并将其解压缩到当前目录:
```
wget https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.24.1.tar.gz
tar -xvf cmake-3.24.1.tar.gz
```
3. 进入解压后的cmake源码目录,并执行以下命令进行配置和编译:
```
cd cmake-3.24.1
./configure
make -j10
```
4. 安装编译好的cmake。使用以下命令将编译好的cmake安装到系统中:
```
sudo make install
```
安装路径为`/usr/local/share/cmake-3.24`。
5. 设置cmake的运行路径。编辑`~/.bash_profile`文件,并在其中添加以下行,将cmake的运行路径导入到环境变量中:
```
export PATH=/usr/local/share/cmake-3.24:$PATH
```
6. 验证安装。运行以下命令检查cmake的版本:
```
cmake --version
```
您应该看到输出显示cmake的版本信息。
阅读全文
相关推荐















