系统环境: CentOS6.3 (64bit)(系统是最小化安装的,没有网络)
所需源码包已事先准备好:
cmake-2.8.10.2.tar.gz
下载地址:
CMake官网:http://www.cmake.org/
软件包我已通过Xftp 4上传到到root目录中。
[root@rhel6 ~]# tar -zxvf cmake-2.8.10.2.tar.gz
[root@rhel6 ~]# cd cmake-2.8.10.2
[root@rhel6 cmake-2.8.10.2]# ./configure
---------------------------------------------
CMake 2.8.10.2,Copyright 2000-2012 Kitware,Inc.
Error when bootstrapping CMake: Cannot find appropriate C compiler on this system. Please specify one using environment variable CC. See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /root/cmake-2.8.10.2/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
报错:缺少C的编译器 解决办法:安装gcc 和 gcc-c++编译器
由于没有网络,只能从安装盘Packages目录里找到下面这些软件包,放入同一个目录并上传到linux,然后进入该目录,rpm -ivh *全部安装
有网的情况下:yum install gcc gcc-c++
[root@rhel6 cmake-2.8.10.2]# ./configure
---------------------------------------------
CMake 2.8.10.2,Inc.
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++ Error when bootstrapping CMake:
Cannot find appropriate Makefile processor on this system.
Please specify one using environment variable MAKE.
---------------------------------------------
---------------------------------------------
Log of errors: /root/cmake-2.8.10.2/Bootstrap.cmk/cmake_bootstrap.log
报错:缺少make
有网的情况下:yum install make
[root@rhel6 cmake-2.8.10.2]# ./configure
[root@rhel6 cmake-2.8.10.2]# make && make install
安装成功!