这是我在输入 ./configure 时遇到的错误:
checking build system type... x86_64-apple-darwin11.3.0
checking host system type... x86_64-apple-darwin11.3.0
checking target system type... x86_64-apple-darwin11.3.0
checking whether the C compiler works... no
configure: error: in `/opt/ruby-1.9.3-p125':
configure: error: C compiler cannot create executables
See `config.log' for more details
如上所示,我正在尝试编译 Ruby 源代码。我做了一些研究,但看起来没有人尝试在 Lion 上自己编译代码。我目前正在运行 10.7.3 OS X Lion、Macbook Pro。
最佳答案
如果您有 Xcode 4.3+,您是否安装了命令行工具?您可以从 Xcode 的首选项面板或从 here 下载它们。 .
关于ruby - 为什么我得到 "C compiler cannot create executables"(在此之前成功编写 C 代码并编译)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9812505/