ubuntu18.04cmake3.16安装
时间: 2023-10-19 19:32:01 浏览: 170
要在Ubuntu 18.04上安装CMake 3.16版本,可以按照以下步骤进行操作:
1. 安装CMake 3.19的apt密钥和存储库:
```
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get update
```
2. 下载CMake 3.16的源码包:
```
wget https://cmake.org/files/v3.16/cmake-3.16.0.tar.gz
```
3. 解压源码包:
```
tar -xvzf cmake-3.16.0.tar.gz
```
4. 进入解压后的目录:
```
cd cmake-3.16.0
```
5. 运行bootstrap命令:
```
./bootstrap
```
6. 编译CMake:
```
make
```
7. 安装CMake:
```
sudo make install
```
8. 建立软链接:
```
sudo ln -sf /usr/local/bin/cmake /usr/bin/cmake
```
9. 检查安装的CMake版本:
```
cmake --version
```
通过以上步骤,您将成功安装CMake 3.16版本,并可以在Ubuntu 18.04上使用它。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Ubuntu18.04安装cmake](https://blog.csdn.net/weixin_43642204/article/details/125592481)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [ubuntu18升级/安装cmake 超详细(亲测成功,2022年7月13日)](https://blog.csdn.net/weixin_42035347/article/details/125763949)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文