【问题标题】:Unable to upgrade cmake from 2.6 to higher无法将 cmake 从 2.6 升级到更高版本
【发布时间】: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"

它没有工作。

【问题讨论】:

    标签: gcc cmake centos6


    【解决方案1】:

    查看Bootstrap.cmk/cmake_bootstrap.log

    配置脚本运行许多测试。我认为其中一个失败了。

    您需要找出是哪一个、测试做什么以及如何使其工作或禁用它。

    您可能想要更新您的问题,并希望有人会发现您系统上的 cmake 引导程序有什么问题。

    【讨论】:

    • 重新安装 gcc、g++ 和 c++ 解决了这个问题。我认为问题是由于没有正确设置环境变量。无论如何,谢谢,
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-01
    • 2018-01-16
    • 2020-11-05
    • 1970-01-01
    • 2016-12-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多