c++ - 如何在 Linux ubuntu 中设置 C++ 环境变量?

标签 c++ linux environment-variables

我刚刚在 Windows 上的 Virtualbox 上安装了 Ubuntu。

我正在尝试安装 cmake,cmake 网站上的安装指南要求我执行以下步骤

./bootstrap
make
make install

但是当我执行 ./bootstrap 命令时,我得到以下错误列表,任何人都可以建议我如何在我的系统上设置 C++ 编译器。因为我刚刚安装了 Ubuntu,所以当前可能没有设置 C++。

请帮忙。


CMake 2.8.1, 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: /home/vikboy/Downloads/cmake-2.8.1/Bootstrap.cmk/cmake_bootstrap.log

最佳答案

通过 apt 安装 build-essential 包。

sudo apt-get install build-essential

关于c++ - 如何在 Linux ubuntu 中设置 C++ 环境变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3040750/

相关文章:

c++ - Visual Studio 中的英特尔编译器未找到 boost 库

c++ - 将 const 添加到指针类型

apache-spark - 设置 PYSPARK_SUBMIT_ARGS 会导致创建 SparkContext 失败

c - 使用 seq_file 构建 Linux/proc 文件驱动程序

html - 如何在 2 个 html 标签之间复制文本?

bash - -bash : sudo: No such file or directory

ant - 使用依赖于环境变量的代码进行单元测试

c++ - 为什么不同流中的内核执行不是并行的?

c++ - 什么时候函数应该是成员函数?

c - Makefile会忽略源文件