ruby - 无法使用 rbenv 在 OSX 10.10 GM 3.0 上构建 Ruby 2.1.3

标签 ruby macos

我发现了几个线程,其他用户也遇到了类似的问题,但似乎没有一个是这样的。

发出命令后:

rbenv install 2.1.3

我收到以下错误:

Installing ruby-2.1.3...

BUILD FAILED (OS X 10.10 using ruby-build 20140926)

Inspect or clean up the working tree at /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586
Results logged to /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586.log

Last 10 log lines:
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... no
configure: error: something wrong with CFLAGS=" -O3 -Wno-error=shorten-64-to-32  "
make: *** No targets specified and no makefile found.  Stop.

最佳答案

Yosemite 上 gcc 的 Homebrew 包 seems to be broken .这就是它不起作用的原因。

遇到了同样的问题。运行:

CC=/usr/bin/gcc rbenv install 2.1.3

为我工作。

关于ruby - 无法使用 rbenv 在 OSX 10.10 GM 3.0 上构建 Ruby 2.1.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26309860/

相关文章:

objective-c - 如何构建Apple的Son ofgrab示例?

macos - 尝试用 brew 安装 MongoDB,它说 "Error: Permission denied - (mongod.conf,/usr/local/etc/mongod.conf)"

ruby - Ruby 的 Time 类可以表示的时间范围是多少?

ruby-on-rails - 在运行 Debian 的虚拟机上使用 RVM 安装 Ruby 无提示失败

Ruby 自动生成

ruby - 为什么一个简单的瘦服务器在进行基准测试时会在 16500 个请求时停止响应?

ruby - 如何使用相同的浏览器窗口使用 selenium-webdriver (ruby) 进行自动化测试?

python - easy_install sphinx 期间出现 OSX Yosemite Openmdao 错误 - NameError : name 'sys_platform' is not defined

Swift NSTextField,在 Cmd + Enter 上执行

java - IntelliJ 在哪里存储它代表我下载的 JDK?