【发布时间】:2014-08-13 09:11:44
【问题描述】:
我正在使用具有 cmake 2.6 的 centos 6.5。 我想升级到更高版本(cmake 2.8 或 cmake 3.0)。 我已经下载了安装文件。 当我使用 ./configure 运行文件时,我收到以下错误消息
[root@dtl-sameet cmake-3.0.0]# ./configure
---------------------------------------------
CMake 3.0.0, Copyright 2000-2014 Kitware, Inc.
C compiler on this system is: gcc
---------------------------------------------
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: /home/sameet/Downloads/cmake-3.0.0/Bootstrap.cmk/cmake_bootstrap.log
我已将 gcc 更新到更高版本,我想保留这个更高版本
[root@dtl-sameet cmake-3.0.0]# gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@dtl-sameet cmake-3.0.0]# g++ --version
g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
link 回答了类似的问题,但我不想安装“开发工具”,因为这会使 gcc 回退到旧版本。
这个link 回答了类似的问题,但我不想安装包管理器。
我将CXX的环境变量设置为
export CXX="/usr/bin/gcc"
它没有工作。
【问题讨论】: