我在Cygwin上,我尝试使用此命令安装Ruby with RVM:curl -sSL https://get.rvm.io | bash -s stable --ruby
。
似乎安装RVM OK,但在编译ruby-2.2.1时会抛出make错误。
rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
ruby-2.2.1 - #removing src/ruby-2.2.1..
Searching for binary rubies, this might take some time.
No binary rubies available for: cygwin/unknown/x86_64/ruby-2.2.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for cygwin.
Requirements installation successful.
Found user configured '-j' flag in 'rvm_make_flags', please note that RVM can detect number of CPU threads and set the '-j' flag automatically if you do not set it.
Installing Ruby from source to: /home/xxx/.rvm/rubies/ruby-2.2.1, this may take a while depending on your cpu(s)...
ruby-2.2.1 - #downloading ruby-2.2.1, this may take a while depending on your connection...
ruby-2.2.1 - #extracting ruby-2.2.1 to /home/xxx/.rvm/src/ruby-2.2.1....
ruby-2.2.1 - #applying patch /home/xxx/.rvm/patches/ruby/2.2.1/fix_installing_bundled_gems.patch.
ruby-2.2.1 - #configuring...........................................................
ruby-2.2.1 - #post-configuration..
ruby-2.2.1 - #compiling.................................................
Error running '__rvm_make -j2',
showing last 15 lines of /home/xxx/.rvm/log/1449160601_ruby-2.2.1/make.log
^
Makefile:241: recipe for target 'printf.o' failed
make[2]: *** [printf.o] Error 1
make[2]: Leaving directory '/home/xxx/.rvm/src/ruby-2.2.1/ext/-test-/printf'
exts.mk:118: recipe for target 'ext/-test-/printf/all' failed
make[1]: *** [ext/-test-/printf/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling receiver.c
compiling super.c
linking shared-object -test-/proc.so
make[2]: Leaving directory '/home/xxx/.rvm/src/ruby-2.2.1/ext/-test-/proc'
make[1]: Leaving directory '/home/xxx/.rvm/src/ruby-2.2.1'
uncommon.mk:189: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
++ /scripts/functions/support : __rvm_make() 383 > return 2
There has been an error while running make. Halting the installation.
命令的完整输出为here。这是一个应该提交的错误吗?接下来我该尝试什么?我想要这样做的真正目的是最终在cygwin上安装Jekyll。
答案 0 :(得分:0)
使用Ruby 2.2.3(https://github.com/rvm/rvm/issues/3358)显然解决了问题。所以当我执行rvm install 2.2.3
时,ruby安装得很好。