首页 文章

使用rvm安装ruby2时出错

提问于
浏览
1

我试图以这种方式安装它:

brew安装autoconf brew安装automake brew安装libyaml rvm安装ruby-head

我试图用rvm安装ruby2但是我收到了这个错误:

ruby-head - #compiling运行'make'时出错,请阅读/Users/boti/.rvm/log/ruby-head/make.log运行make时出错 . 暂停安装 . Ruby'ruby-head'是使用clang构建的 - 但它没有(完全)支持,期望错误 .

这是我的编译日志:

编译./missing/setproctitle.c编译dmyext.c链接miniruby /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:111: [BUG]堆栈一致性错误(sp:38,bp: 36)ruby 2.0.0dev(2013-02-25)[x86_64-darwin12.2.0] - 崩溃报告日志信息------------------------ --------------------请参阅下面的崩溃报告日志文件:*〜/ Library / Logs / CrashReporter * / Library / Logs / CrashReporter 〜/ Library / Logs / DiagnosticReports * / Library / Logs / DiagnosticReports的更多细节 . - 控制框架信息--------------------------------------------- - c:0006 p:0038 s:0038 e:000037 CLASS /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:111 c:0005 p:0035 s:0034 e:000033 CLASS / Users / boti / .rvm / src / ruby-head / lib / fileutils.rb:107 c:0004 p:0009 s:0032 e:000031 TOP /Users/boti/.rvm/src/ruby-head/lib/fileutils .rb:85 [FINISH] c:0003 p:---- s:0030 e:000029 CFUNC:require c:0002 p:0098 s:0026 E:000f88 EVAL ./tool/mkconfig.rb:11 [FINISH] c:0001 p:0000 s:0002 E:0017a8 TOP [FINISH] ./tool/mkconfig.rb:11:in <main>' . / tool / mkconfig.rb:11:inrequire'/Users/boti/.rvm /src/ruby-head/lib/fileutils.rb:85:in <top(required)>'/Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:107:in'/ Users / boti / .rvm / src / ruby-head / lib / fileutils.rb:111:in'' - 其他运行时信息----------------------- ------------------------已加载的脚本:./ tool / mkconfig.rb已加载的功能:0 enumerator.so [注意]您可能遇到过错误在Ruby解释器或扩展库中 . 欢迎提供错误报告 . 有关详细信息:http://www.ruby-lang.org/bugreport.html make: [.rbconfig.time]中止陷阱:6

这是我编译日志的开始:

[2013-02-24 20:58:47] make CC = /usr/bin/gcc-4.2 LD = ld LDSHARED = /usr/bin/gcc-4.2 -dynamiclib CFLAGS = -O3 -fno-fast-math - ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror = pointer-arith -Werror = write-strings -Werror = declaration- after-statement -Werror = shorten-64-to-32 -Werror = implicit-function-declaration -fno-common -pipe XCFLAGS = -include ruby / config.h -include ruby / missing.h -D_FORTIFY_SOURCE = 2 -fstack- protector -fno-strict-overflow -fvisibility = hidden -DRUBY_EXPORT CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I . -I.ext / include / x86_64-darwin12.2.0 -I./include -I . DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -install_name /Users/boti/.rvm/rubies/ruby-head/lib/libruby.2.0.0.dylib -current_version 2.0.0 -compatibility_version 2.0 . 0 -fstack-protector -Wl,-u,_objc_msgSend -fstack-protector -Wl,-u,_objc_msgSend SOLIBS =

我将不胜感激任何帮助...

3 回答

  • 0

    试试这个:

    CC=clang rvm reinstall 2.0.0-p0
    

    它会编译,但可能会导致其他错误(我正在努力寻找导致原始问题的原因) .

  • 6

    我在使用XCode 4.6和brew的Mac OS X 10.8.2上遇到miniruby的构建错误 .

    当只是尝试运行“rvm install 2.0.0”时,结果如下所示:

    https://gist.github.com/polarapfel/5080946

    尝试将CC设置为/ usr / bin / clang时,结果如下所示:

    https://gist.github.com/polarapfel/5081054

    无论哪种方式,结果对我来说都是一样的 .

    这是有趣的事情:我可以毫无问题地 Build 头脑 . 我认为2.0.0p0在Mac OS X上不是一个干净的版本,需要更多的工作来解决问题 .

    好吧,这样做对我来说:简单地运行“rvm get stable”摆脱了构建问题 .

  • 0

    确保你使用clang-v的clang 3.0 .
    否则,如果您使用的是较旧的clang版本,请使用以下命令编译2.0.0-p0和gcc 4.2:

    rvm install ruby --with-gcc=gcc-4.2
    

    我会首先删除旧的红宝石尝试:

    rvm remove 2.0.0-p0
    

    还要确保你有rvm头(不稳定):

    rvm get head  --autolibs=3
    

    如果这应该解决miniruby / enc编译问题,那么2.0.0-p0是一个干净的构建,但你使用的是过时的编译器 . 安装最新的Xcode并不一定包含最新的铿锵声版本 .

相关问题