我使用 ruby-install ruby 2.0.0
启动了旧版本 Ruby 的安装
compiling readline.c
readline.c:1886:26: error: use of undeclared identifier 'Function'
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c:1886:36: error: expected expression
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
2 errors generated.
make[2]: *** [readline.o] Error 1
make[1]: *** [ext/readline/all] Error 2
make: *** [build-ext] Error 2
!!! Compiling ruby 2.0.0-p451 failed!
在这个错误之上,我还有一堆警告:
compiling parser.c
parser.c:94:18: warning: unused variable 'JSON_object_error' [-Wunused-const-variable]
static const int JSON_object_error = 0;
^
parser.c:96:18: warning: unused variable 'JSON_object_en_main' [-Wunused-const-variable]
static const int JSON_object_en_main = 1;
...还有很多这样的
16 warnings generated.
我安装了 ruby 2.1.0 并且工作正常,但我需要使用 2.0.0 处理一个项目。我使用的是 chruby,而不是 RVM。
有什么想法吗?
最佳答案
好像跟这个问题有关https://github.com/sstephenson/ruby-build/issues/526并已在最新版本的 ruby 中修复。
关于ruby - 编译 chruby 安装 Ruby 2.0.0 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23614555/