【问题标题】:XCode 4.3 - perl can't find C compiler after upgrade from XCode 4.2XCode 4.3 - 从 XCode 4.2 升级后 perl 找不到 C 编译器
【发布时间】:2012-06-05 19:29:06
【问题描述】:

我最近升级到 Lion 和 XCode 4.3,现在我使用 perl 执行的任何需要 C 编译器的操作都无法构建:

root# perl Makefile.PL 
Couldn't find your C compiler
Compilation failed in require at Makefile.PL line 5.
BEGIN failed--compilation aborted at Makefile.PL line 5.

我的 c 编译器设置为:

root# perl -V:cc
cc='llvm-gcc-4.2';

XCode 4.3 有什么改变吗?我现在如何为 perl 设置 C 编译器?

【问题讨论】:

    标签: c perl compiler-construction osx-lion xcode4.3


    【解决方案1】:

    新版本的 Xcode 没有安装二进制文件(例如 C 编译器),它们可以在您的 $PATH 中找到。您需要转到 XCode 首选项的“下载”部分并选择安装命令行工具。

    更多信息from Apple(查找“命令行工具是可选的”)。

    【讨论】:

      【解决方案2】:

      如果您认为它们兼容,您可以创建符号链接或编辑 Config.pm (path = perl -MConfig -E'say $INC{"Config.pm"}')。

      【讨论】:

        猜你喜欢
        • 2012-03-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-24
        • 2012-03-09
        • 2014-07-04
        • 2013-11-14
        相关资源
        最近更新 更多