2016-09-21 87 views
0

我試圖通過rbenv安裝rubinius,並且出現此錯誤。我不確定這裏有什麼問題。Rbenv無法安裝rubinius

下面是安裝jruby的(成功)結果:

[[email protected] log]$ rbenv install jruby-1.7.25 
Downloading jruby-bin-1.7.25.tar.gz... 
-> https://dqw8nmjcqpjn7.cloudfront.net/03a26ace9be8b7f7a4fce3e0dfd106dfe2d7f48c750c3b1dc74046663e5b57a1 
Installing jruby-1.7.25... 
Installed jruby-1.7.25 to /home/app/.rbenv/versions/jruby-1.7.25 

這裏是安裝rubinius的(失敗)結果:

[[email protected] log]$ rbenv install rbx-3.42 
Downloading rubinius-3.42.tar.bz2... 
-> https://dqw8nmjcqpjn7.cloudfront.net/4fc4413101100f6393894632eef522c2667a821856ac32eb99ccecab2aeeae85 
Installing rubinius-3.42... 

BUILD FAILED (Amazon Linux AMI 2016.03 using ruby-build 20160913-7-gaa1a7a3) 

Inspect or clean up the working tree at /tmp/ruby-build.20160921192313.24426 
Results logged to /tmp/ruby-build.20160921192313.24426.log 

Last 10 log lines: 
rake aborted! 
Error compiling 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:68:in `command' 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:234:in `cxx_compile' 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:221:in `compile' 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:433:in `build' 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:895:in `block (2 levels) in perform_tasks' 
Tasks: TOP => install => build:build => machine/vm 
(See full trace by running task with --trace) 
Error: g++ -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/machine -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/machine/include -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/machine/builtin -I. -Imachine/test/cxxtest -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/libsodium/src/libsodium/include -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/udis86 -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/libffi/include -Ivendor/double-conversion/src -DHAVE_CONFIG_H -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/machine/include/capi -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/oniguruma -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/libtommath -pipe -Wall -fno-omit-frame-pointer -g -fPIC -O2 -DHAS_EXECINFO -DHAVE_SPT_REUSEARGV -DHAVE_CLOCK_GETTIME -DHAVE_NL_LANGINFO -DHAVE_POSIX_FADVISE -DHAVE_STRNLEN -DHAVE_TIMERFD -DHAVE_INOTIFY -DHAVE_STRUCT_STAT_ST_ATIM -DHAVE_STRUCT_STAT_ST_MTIM -DHAVE_STRUCT_STAT_ST_CTIM -DHAVE_TM_GMTOFF -DHAVE_TM_ZONE -DHAVE_TIMEZONE -DHAVE_TZNAME -DHAVE_DAYLIGHT -DHAVE_ALLOCA_H -DHAVE_STRING_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TIMES_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DHAVE_STDARG_H -DSTRERROR_R_CHAR_P -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/rapidjson -I/usr/include -I/usr/include -D_GNU_SOURCE -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -DENABLE_LLVM -Wno-unused-function -Werror -DRBX_PROFILER -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-rtti -fvisibility-inlines-hidden -std=c++11 -c -o machine/artifacts/logger.cpp.o machine/logger.cpp 
+0

貌似有一個編譯錯誤;可能是因爲您的機器上缺少庫。完整的錯誤日誌在'/ tmp/ruby​​-build.20160921192313.24426.log'中 - 希望在那裏有更好的線索,在已經顯示的最後10行之上。你能否在你的文章中包含這個文件的關鍵字? –

回答

0

如果沒有一個完整的看一下日誌文件很難確切地知道問題是什麼。我能夠在安裝了自制軟件的最新版本的ruby-build上安裝OSX 10.9.4。首先我不得不brew install llvm

我建議看看https://github.com/rbenv/ruby-build哪個rbenv install在引擎蓋下使用。根據我使用rbenv install的經驗,問題通常是使用錯誤的c編譯器或缺少庫。

一些有用的命令檢查你的系統默認設置爲:

which cc 
which g++ 
cc --version 
g++ --version 

檢查你的$ PATH設置echo $PATH