linux - Mac OS X 10.9,安装 cmake 时无法在此系统上找到合适的 C 编译器

标签 linux macos gcc cmake osx-mavericks

我尝试在 MAC OS X 10.9 中安装 cmake,并收到以下错误日志:

Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted.

但是我已经在我的操作系统中安装了 gcc:

localhost:cmake-2.8.11.2 markyoung$ gcc --help
Usage: i686-apple-darwin11-llvm-gcc-4.2 [options] file...
Options:
  -pass-exit-codes         Exit with highest error code from a phase
  --help                   Display this information
  --target-help            Display target specific command line options
...

如何解决这个问题?

最佳答案

使用homebrew如果这是你的选择。之后:

brew install cmake

为我工作。注意:在此之前我已经通过brew install gcc48安装了gcc-4.8。

关于linux - Mac OS X 10.9,安装 cmake 时无法在此系统上找到合适的 C 编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17898632/

相关文章:

c - 每个 netlink 系列都有哪些多播组?

linux - 为什么我在数字比较时收到命令未找到错误?

macos - 如何在 Mac OS X 上使用/home 目录

python - opencv 安装在 mac 上但无法通过 python 控制台使用它

c++ - 为什么 GCC 在编译时不评估 constexpr?

c++ - 如何检查(通过预处理器)C 源文件是否被编译为 C++ 代码

linux - 为什么 tcpdump 不在后台运行?

linux - Google 云平台 (Linux) 上的 ASP.NET Core 应用

macos - 如何在MacOS上安装Lua?

linux - 用 gcc 汇编 32 位 x86 代码?