2

背景: 在 Hp Chromebook 14 上通过 crouton 运行 ubuntu 14.04 (xfce)。

概述: 我正在尝试通过 rvm 安装 ruby​​ 1.9.2。

RVM 说 1.9.2 需要 2.x 并且安装没有问题。在使用 1.9.2 之后,它在编译期间失败并中止安装。*我已经运行了安装命令 x3,同样的错误

错误:

Error running '__rvm_make -j2',
showing last 15 lines of /home/alkarion/.rvm/log/1401550868_ruby-1.9.2-head/make.log
In file included from parse.y:22:0:
parse.h:188:21: warning: ‘struct parser_params’ declared inside parameter list [enabled by default]
 int yyparse (struct parser_params *parser);
                     ^
parse.h:188:21: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
parse.c: In function ‘ruby_yyparse’:
parse.c:4501:7: error: too few arguments to function ‘yylex’
     {
       ^
parse.y:325:12: note: declared here
 static int yylex(void*, void*);
            ^
make: *** [parse.o] Error 1
make: *** Waiting for unfinished jobs....
++ return 2
There has been an error while running make. Halting the installation.

这是错误之前的代码:

$ rvm install ruby-1.9.2
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /home/alkarion/.rvm/rubies/ruby-1.9.2-head, this may take a while depending on your cpu(s)...
HEAD is now at d1b23d1 merge revision(s) 36533:
remote: Counting objects: 19, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 11 (delta 8), reused 11 (delta 8)
Unpacking objects: 100% (11/11), done.
From git://github.com/ruby/ruby
   06fb823..9529ed2  trunk      -> origin/trunk
From git://github.com/ruby/ruby
 * branch            ruby_1_9_2 -> FETCH_HEAD
Already up-to-date.
Copying from repo to src path...
ruby-1.9.2-head - #applying patch /home/alkarion/.rvm/patches/ruby/GH-488.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.............
4

1 回答 1

2

ruby-1.9.2-p320 似乎绕过了这个问题。

rvm install ruby-1.9.2-p320

我不确定问题出在哪里,但一两周前能够在 ubuntu 14.04 上通过 rvm 成功安装 ruby​​ 1.9.2 和 ruby​​ 2.0 但今天我收到了与您相同的错误。此外,我注意到 ruby​​ 2.1 是作为依赖项而不是 2.0 安装的,因此这可能是问题的一部分。

  • 乔希
于 2014-06-02T18:28:58.767 回答