新手问题 Mac 10.9 下使用 rbenv install 2.1.0-dev 出问题

wuShiJingZuo · February 19, 2014 · Last by wuShiJingZuo replied at February 19, 2014 · 4846 hits

最近项目需要,在 mac 下折腾 rails,按照http://gorails.com/setup/osx/10.9-mavericks安装到rbenv install 2.1.0-dev 一步 出现

Cloning https://github.com/ruby/ruby.git...
Installing ruby-2.1.0-dev...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/q4/fd_8w2vd4lx9p9k5gyjlvtfm0000gn/T/ruby-build.20140219100050.46383
Results logged to /var/folders/q4/fd_8w2vd4lx9p9k5gyjlvtfm0000gn/T/ruby-build.20140219100050.46383.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... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS="-L'/Users/apple/.rbenv/versions/2.1.0-dev/lib' "

BUILD FAILED

Inspect or clean up the working tree at /var/folders/q4/fd_8w2vd4lx9p9k5gyjlvtfm0000gn/T/ruby-build.20140219100050.46383
Results logged to /var/folders/q4/fd_8w2vd4lx9p9k5gyjlvtfm0000gn/T/ruby-build.20140219100050.46383.log

Last 10 log lines:
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... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS="-L'/Users/apple/.rbenv/versions/2.1.0-dev/lib' "
make: *** No targets specified and no makefile found.  Stop.```




已经安装好:xcode 和 xcode的command line。

换个 stable 的 version, 比如 2.0.0-p353。ruby-build 经常安装不成功。 参看这个 issue https://github.com/sstephenson/ruby-build/pull/458

#1 楼 @hardywu 谢谢,换用后,报错说没有发现 2.0.0-p353。

#2 楼 @wuShiJingZuo rbenv install -l 出来什么?

#3 楼 @hardywu 出来好多,我选了几个 1.9.3-rc1 2.0.0-dev 2.0.0-p0 2.0.0-p195 2.0.0-p247 2.0.0-preview1 2.0.0-preview2 2.0.0-rc1 2.0.0-rc2 2.1.0-dev 从中选一个 2.0.0- ?

奇怪,你这里怎么这么少。。。只能选这里列出来的。 你就试试 2.0.0-p247 吧,我前几天还在用。

#5 楼 @hardywu 不是啊,出来很多,

Available versions:
  1.8.6-p383
  1.8.6-p420
  1.8.7-p249
  1.8.7-p302
  1.8.7-p334
  1.8.7-p352
  1.8.7-p357
  1.8.7-p358
  1.8.7-p370
  1.8.7-p371
  1.8.7-p374
  1.9.1-p378
  1.9.1-p430
  1.9.2-p0
  1.9.2-p180
  1.9.2-p290
  1.9.2-p318
  1.9.2-p320
  1.9.3-dev
  1.9.3-p0
  1.9.3-p125
  1.9.3-p194
  1.9.3-p286
  1.9.3-p327
  1.9.3-p362
  1.9.3-p374
  1.9.3-p385
  1.9.3-p392
  1.9.3-p429
  1.9.3-p448
  1.9.3-preview1
  1.9.3-rc1
  2.0.0-dev
  2.0.0-p0
  2.0.0-p195
  2.0.0-p247
  2.0.0-preview1
  2.0.0-preview2
  2.0.0-rc1
  2.0.0-rc2
  2.1.0-dev
  jruby-1.5.6
  jruby-1.6.3
  jruby-1.6.4
  jruby-1.6.5
  jruby-1.6.5.1
  jruby-1.6.6
  jruby-1.6.7
  jruby-1.6.7.2
  jruby-1.6.8
  jruby-1.7.0
  jruby-1.7.0-preview1
  jruby-1.7.0-preview2
  jruby-1.7.0-rc1
  jruby-1.7.0-rc2
  jruby-1.7.1
  jruby-1.7.2
  jruby-1.7.3
  jruby-1.7.4
  maglev-1.0.0
  maglev-1.1.0-dev
  maglev-2.0.0-dev
  mruby-dev
  rbx-1.2.4
  rbx-2.0.0-dev
  rbx-2.0.0-rc1
  ree-1.8.6-2009.06
  ree-1.8.7-2009.09
  ree-1.8.7-2009.10
  ree-1.8.7-2010.01
  ree-1.8.7-2010.02
  ree-1.8.7-2011.03
  ree-1.8.7-2011.12
  ree-1.8.7-2012.01
  ree-1.8.7-2012.02
  topaz-dev```

你需要升级 ruby-build

装个 rbenv-update 插件后用 rbenv update 更新 rbevn 以及各种插件,你的那个 rbenv install --list 出来的版本都不是最新的

#7 楼 @ruohanc 刚安装又失败了,不知如何升级?谢谢。

#9 楼 @wuShiJingZuo 这种问题就还是问问谷歌吧.....升级方式跟你安装的方法相关,我全写出来就太辛苦了..

#10 楼 @ruohanc 恩,好的,谢谢。辛苦了。

You need to Sign in before reply, if you don't have an account, please Sign up first.