Gcc 无法将cmake从2.6升级到更高版本
我使用的是centos 6.5,它有一个cmake 2.6。 我想升级到更高版本(cmake 2.8或cmake 3.0)。 我已经下载了安装文件。 当我使用./configure运行文件时,会收到以下错误消息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
[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++解决了这个问题。我认为这个问题是由于环境变量设置不当造成的。无论如何,谢谢,