栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

linux 下CMake如何升级?(安装指定版本cmake)

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

linux 下CMake如何升级?(安装指定版本cmake)

先把当前版本全卸载

# sudo apt remove cmake
# sudo apt purge --auto-remove cmake

然后到cmake官网下载指定.sh版本

https://cmake.org/files/

我i下这个

下完后复制到虚拟机里

终端运行

sudo ./cmake-3.8.0-Linux-x86_64.sh --skip-license --exclude-subdir --prefix=/usr/local

如果提示没权限就赋予777权限

详细指令:

root@ubuntu:/home/yg/share# ./cmake-3.8.0-Linux-x86_64.sh --skip-license --exclude-subdir --prefix=/usr/local
bash: ./cmake-3.8.0-Linux-x86_64.sh: 权限不够
root@ubuntu:/home/yg/share# 
root@ubuntu:/home/yg/share# 
root@ubuntu:/home/yg/share# chmod 777 cmake-3.8.0-Linux-x86_64.sh 
root@ubuntu:/home/yg/share# 
root@ubuntu:/home/yg/share# 
root@ubuntu:/home/yg/share# 
root@ubuntu:/home/yg/share# ./cmake-3.8.0-Linux-x86_64.sh --skip-license --exclude-subdir --prefix=/usr/local
CMake Installer Version: 3.8.0, Copyright (c) Kitware
This is a self-extracting archive.
The archive will be extracted to: /usr/local

Using target directory: /usr/local
Extracting, please wait...

Unpacking finished successfully
root@ubuntu:/home/yg/share# 
root@ubuntu:/home/yg/share# 
root@ubuntu:/home/yg/share# 

测试版本:

root@ubuntu:/home/yg/share# cmake --version
cmake version 3.8.0

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

参考文章:如何指定在Ubuntu中安装CMake的位置?

20210929 但是卸载不知道怎么卸载,尴尬了。。。。
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/277200.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号