ubuntu安装cmake3.16
时间: 2023-12-18 13:29:45 浏览: 242
ubuntu安装cmake
在Ubuntu 16.04中安装cmake-3.16.0的步骤如下:
1.下载cmake-3.16.0的源代码包,可以从官网下载:https://cmake.org/download/ 或者使用以下命令下载:
```shell
wget https://github.com/Kitware/CMake/releases/download/v3.16.0/cmake-3.16.0.gz
```
2.解压源代码包:
```shell
tar -zxvf cmake-3.16.0.tar.gz
```
3.进入解压后的目录:
```shell
cd cmake-3.16.0
```
4.执行以下命令进行编译和安装:
```shell
./bootstrap
make
sudo make install
```
5.最后,将cmake添加到系统路径中:
```shell
export PATH=$PATH:/usr/local/cmake/cmake-3.16.0-linux-x86_64/bin
```
阅读全文