XCode 4.3 - 从XCode 4.2升级后,perl无法找到C编译器

Osc*_*mez 2 c compiler-construction perl osx-lion xcode4.3

我最近升级到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.
Run Code Online (Sandbox Code Playgroud)

我的c编译器设置为:

root# perl -V:cc
cc='llvm-gcc-4.2';
Run Code Online (Sandbox Code Playgroud)

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

lar*_*sks 5

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

来自Apple的更多信息(查找"命令行工具是可选的").