【问题标题】:Getting Warning while installing flink on MacBook "There is no C compiler on your system"在 MacBook 上安装 flink 时收到警告“系统上没有 C 编译器”
【发布时间】:2013-08-27 10:07:34
【问题描述】:

为了获得支持,我在我的 MacBook Pro 上安装了fink。执行引导脚本后,我收到以下错误日志

Checking package... looks good (fink-0.35.1).
Checking system... i386-apple-darwin12.4.0
This system is supported and tested.
Distribution: 10.8
Architecture: x86_64
Checking cc... not found.
ERROR: There is no C compiler on your system. Make sure that the Developer
Tools are installed.

我没有在 /usr/bin/ 目录中找到 gcc。

看完here,我猜x-code默认支持gcc编译器。

任何人都知道我应该如何获得 fink 的支持,或者是否有任何其他方式获得 apt-get 的支持。

【问题讨论】:

  • XCode 确实包含 gcc 但它位于 /Applications/Xcode.app/Contents/Developer/usr/bin 中(使用xcode-select -print-path 获取 /usr/bin 之前的路径部分)跨度>
  • 如何使用它来解决上述问题?
  • 安装 XCode,然后将额外的目录添加到路径中。希望 fink 安装应该找到 C 编译器。
  • 使用提及命令我得到路径“/Applications/Xcode.app/Contents/Developer”,抱歉,我需要在哪里添加此路径?
  • 您需要将其添加到PATH shell 变量中的命令搜索路径中。您可以通过将 export PATH="$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin" 添加到您的 .bash_profile 来做到这一点

标签: macos gcc apt-get cc fink


【解决方案1】:
  • 首先,您需要安装Xcode及其命令行工具来获取gcc编译器
  • 确保您的 /usr/bin 目录中有 gcc 的工作版本
  • 从已安装的gcc 中的/usr/bin 创建符号链接cc

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-15
    • 1970-01-01
    • 1970-01-01
    • 2013-11-10
    • 1970-01-01
    相关资源
    最近更新 更多