系统相关
首页 > 系统相关> > Ubuntu16.04通过pip升级cmake

Ubuntu16.04通过pip升级cmake

作者:互联网

介绍

有台机器是Ubuntu 16.04环境,官方apt源里cmake最高版本为3.5
而VScode早就已经不支持cmake 3.5断点调试
网上大多方法手动下载cmake二进制文件进行替换,比较繁琐
后来无意间在Pypi源里看到了一个cmake十分震惊
试了一下真的可以安装,版本自由选择

方法

首先确认系统自带cmake版本

$ cmake --version
cmake version 3.5.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

卸载系统自带的cmake 3.5

$ sudo apt remove cmake

通过pip进行安装

$ sudo pip install --upgrade cmake==3.9.6

查看版本

$ cmake --version
cmake version 3.9.6

CMake suite maintained and supported by Kitware (kitware.com/cmake).

附录

列出目前pip源上可用的camke版本号供参考

cmake versions: 0.1.0, 0.2.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.7.1, 0.8.0, 0.9.0, 3.6.3, 3.6.3.post1, 3.7.2, 
3.8.2, 3.9.6, 3.10.3, 3.11.0, 3.11.4, 3.11.4.post1, 3.12.0, 3.13.0, 3.13.1, 3.13.2, 3.13.2.post1, 3.13.3, 
3.14.3.post1, 3.14.4.post1, 3.15.3.post1, 3.16.3, 3.16.3.post1, 3.16.5, 3.16.6, 3.16.7, 3.16.8, 3.17.0, 
3.17.1, 3.17.2, 3.17.3, 3.18.0, 3.18.2, 3.18.2.post1, 3.18.4, 3.18.4.post1

标签:3.18,Ubuntu16.04,cmake,3.13,3.16,3.17,post1,pip
来源: https://www.cnblogs.com/azureology/p/14128365.html