ruby - 为什么我得到 "C compiler cannot create executables"(在此之前成功编写 C 代码并编译)?

标签 ruby osx-lion

这是我在输入 ./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/

相关文章:

ruby - Ruby 是否有一个 Vim 插件可以在 Rails 之外提供 "switch to/from test"命令?

perl - Archive::Extract 模块在 mac os x lion 上的 perl v5.12.3 中发出警告

ruby-on-rails - OS X Lion,尝试安装Nokogiri-缺少libxml2

ruby - 为什么在这个阶乘代码(无递归)中,步骤是 -1 而不是 +1?

ruby - 关于ruby中 "gets"的问题

OSX 上的 Rubygems 丢失

xcode - 我在Lion(Mac OS X 10.7.3)上安装了Xcode 4,但仍然找不到“make”命令

macos - mac上mongodb数据库的位置

ruby - 如何在 ruby​​ 中使用 File.Open 打开存储在变量中的文件?

arrays - 为什么我的 Ruby 方法返回一个数组而不是字符串?