Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gcc 无法将cmake从2.6升级到更高版本_Gcc_Cmake_Centos6 - Fatal编程技术网

Gcc 无法将cmake从2.6升级到更高版本

Gcc 无法将cmake从2.6升级到更高版本,gcc,cmake,centos6,Gcc,Cmake,Centos6,我使用的是centos 6.5,它有一个cmake 2.6。 我想升级到更高版本(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 compi

我使用的是centos 6.5,它有一个cmake 2.6。 我想升级到更高版本(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.
答案与此类似,但我不想安装“开发工具”,因为这会使gcc退回到旧版本

这回答了类似的问题,但我不想安装包管理器

我将CXX的环境变量设置为

export CXX="/usr/bin/gcc"

它不起作用

查看
Bootstrap.cmk/cmake\u Bootstrap.log

configure脚本运行许多测试。我猜其中一个失败了

你需要找出哪一个,测试做什么,以及如何使它工作或禁用它


<>你可能想更新你的问题,希望有人能找出你的系统上的CKootBootstrap有什么不对。< /P>重新安装GCC,G++和C++解决了这个问题。我认为这个问题是由于环境变量设置不当造成的。无论如何,谢谢,