linux下安装cmake方法
来源:互联网 发布:win7软件启动慢 编辑:程序博客网 时间:2024/06/13 09:25
inux下安装软件的源码包很多都需要使用cmake进行编译,因此需要我们先给linux系统安装cmake
1、打开网址:http://www.cmake.org/cmake/resources/software.html,找到最新版本的位置。一般开放源代码软件都会有两个版本发布:Source Distribution 和 Binary Distribution,前者是源代码版,你需要自己编译成可执行软件。后者是已经编译好的可执行版,直接可以拿来用的。
2、查看linux的位数,输入:
[root@xjfw3 ~]# getconf LONG_BIT64[root@xjfw3 ~]#如果结果是64表示该系统是linux64位的,如果结果是32则表示系统是linux32位。
3、我现在所用的这台是64位,因此在cmake安装包的网站中选择binary distribution下的linux x86_64下的cmake-3.10.0-rc4-Linux-x86_64.tar.gz压缩包。
4、把下载好的包上传到指定路径,比如/root ,然后进行解压。[root@xjfw3 ~]# tar -zxvf cmake-3.10.0-rc4-Linux-x86_64.tar.gz5、把解压后的cmake-3.10.0-rc4-Linux-x86_64目录该名为cmake。
[root@xjfw3 ~]# mv cmake-3.10.0-rc4-Linux-x86_64 cmake
6.编辑.bash_profile,找到export PATH=这些行,在这些行的后面添加:/root/cmake/bin,从而设置环境变量。
[root@xjfw3 ~]# vi .bash_profile # .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/bin:/root/cmake/binexport PATH
输入完毕保存
7.查看版本,测试是否安装成功。
[root@xjfw3 ~]# cmake --versioncmake version 3.10.0-rc4CMake suite maintained and supported by Kitware (kitware.com/cmake).[root@gsxjfw3 ~]#
结果是:cmake version 3.10.0(安装cmake成功!)
阅读全文
0 0
- linux下安装cmake方法
- linux下安装cmake
- linux下安装cmake
- Linux下安装CMake
- Linux下cmake安装
- linux下安装cmake
- Linux 下cmake安装
- Linux 下Cmake安装
- linux下安装cmake
- linux下安装cmake
- linux 下 安装使用 cmake
- linux 下源码安装cmake
- linux下源码安装cmake
- Ubuntu下linux安装cmake
- Linux下CMake 安装教程
- 【整理】LINUX下使用CMAKE安装MYSQL
- osgearth mac/linux 下 cmake 编译安装
- 【整理】LINUX下使用CMAKE安装MYSQL
- Tengine安装./configure: error: C compiler cc is not found
- javascript new date() 注意兼容性问题
- 【JAVA-规约】阿里巴巴JAVA开发手册
- GBDT(MART) 迭代决策树入门教程 | 简介
- PAT (Top Level) Practise 1018Subnumbers (35)
- linux下安装cmake方法
- 智能算法+DNN
- Nginx负载均衡与高可用的实现
- python_tornado
- centos7下git安装及使用
- ContOS7.X 下 安装 MySql
- 机器学习之条件随机场(CRF)
- install pydot and graphviz for win10
- bzoj3997 [TJOI2015]组合数学