centos 6.8 安装cmake 2.8.8 报错

来源:互联网 发布:淘宝app首页流量来源 编辑:程序博客网 时间:2024/06/08 03:36

1 系统信息

centos 6.8

2 cmake 安装

tar -xf cmake-2.8.8.tar.gz

cd cmake-2.8.8

./configure
gmake && gmake install


3 错误信息

案例:1

--------------------------------------------
CMake 2.8.8, Copyright 2000-2009 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: /usr/local/src/cmake-2.8.8/Bootstrap.cmk/cmake_bootstrap.log


原因:缺少C的编译器
解决办法:安装gcc编译器
[root@localhost ~]# yum install gcc

案例:2

---------------------------------------------
CMake 2.8.8, Copyright 2000-2009 Kitware, Inc.
C compiler on this system is: cc
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /usr/local/src/cmake-2.8.8/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
原因:缺少C++编译器 
解决办法:安装gcc-c++编译器
[root@localhost ~]# yum install gcc-c++


原创粉丝点击