2014-10-17 69 views
7

在優勝美地上安裝Ruby on 1.9.2與rvm時出現錯誤。有人能幫助我嗎?我更新了自制軟件和rvm。我正在與這個項目上的其他人一起工作,所以我無法升級紅寶石。我在下面輸入了一個鏈接。提前致謝!在優勝美地上安裝Ruby 1.9.2時出錯

Kanyons-MacBook-Pro:~ USERNAME$ rvm install 1.9.2-head 
ruby-1.9.2-head - #removing src/ruby-1.9.2-head.. 
Checking requirements for osx. 
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date. 
Requirements installation successful. 
Installing Ruby from source to: /Users/USERNAME/.rvm/rubies/ruby-1.9.2-head, this may take a while depending on your cpu(s)... 
HEAD is now at 5d9f08f bump patchlevel 
From git://github.com/ruby/ruby 
* branch   ruby_1_9_2 -> FETCH_HEAD 
Current branch ruby_1_9_2 is up to date. 
Copying from repo to src path... 
ruby-1.9.2-head - #applying patch /Users/USERNAME/.rvm/patches/ruby/1.9.2/head/r42282.patch. 
ruby-1.9.2-head - #applying patch /Users/USERNAME/.rvm/patches/ruby/ssl_no_ec2m.patch. 
ruby-1.9.2-head - #autoreconf. 
ruby-1.9.2-head - #configuring.......................................... 
ruby-1.9.2-head - #post-configuration. 
ruby-1.9.2-head - #compiling.................. 
Error running '__rvm_make -j 1', 
showing last 15 lines of /Users/USERNAME/.rvm/log/1413513694_ruby-1.9.2-head/make.log 
generating newline.c ... 
converter for universal_newline 
converter for crlf_newline 
converter for cr_newline 
done. (0.06user 0.00system 0.01elapsed) 
/usr/local/opt/apple-gcc42/bin/gcc-4.2 -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I.  -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o newline.o -c newline.c 
couldn't understand kern.osversion `14.0.0' 
/usr/local/opt/apple-gcc42/bin/gcc-4.2 -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o dmyext.o -c dmyext.c 
couldn't understand kern.osversion `14.0.0' 
/usr/local/opt/apple-gcc42/bin/gcc-4.2 -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -L. -L/usr/local/opt/readline/lib   -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -Wl,-u,_objc_msgSend main.o dmydln.o dmyencoding.o dmyversion.o miniprelude.o array.o bignum.o class.o compar.o complex.o dir.o dln_find.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o dmyext.o -lpthread -ldl -lobjc -o miniruby 
couldn't understand kern.osversion `14.0.0' 
miniruby(65084,0x7fff7bed0300) malloc: *** error for object 0x100801a08: incorrect checksum for freed object - object was probably modified after being freed. 
*** set a breakpoint in malloc_error_break to debug 
make: *** [.rbconfig.time] Abort trap: 6 
++ return 2 
There has been an error while running make. Halting the installation. 

回答

0

我沒有最好的答案,但它似乎是OSX處理GCC的方式中的錯誤...或其他。我發現了一個提到補丁的線程,並且還提供瞭如何在此處安裝它:https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407

我還沒有做,但我即將和我會報告回來。不知道這是否是一個「答案」,但這也是我的問題,我需要得到這個固定的pronto!

編輯:補丁的無工作(可能是因爲我不知道如何安裝它們,但運行在我的終端這一行,然後做rvm install 1.9.2似乎工作:

export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH 

從這個答案兩者:How to use/install gcc on Mac OS X 10.8/Xcode 4.4

+0

這兩個想法並沒有爲我工作,出於某種原因。我要卸載所有的東西,然後重新安裝brew和rvm,看看能否解決它。謝謝! – Kanyon 2014-10-18 14:22:01

+0

是否爲你工作?我最終不得不恢復到時間機器備份,以使我的環境與1.9.2一起工作 – sp33k3rph433k 2014-10-19 22:35:01

+0

它沒有。我認爲這是編譯器不與優勝美地合作。 – Kanyon 2014-10-20 13:42:50

相關問題