gpt4 book ai didi

ruby - rbenv - 编译 Ruby 2.1.1 时出错

转载 作者:数据小太阳 更新时间:2023-10-29 07:23:47 25 4
gpt4 key购买 nike

我在 DigitalOcean Droplet 上编译 Ruby 时遇到问题。

rbenv 0.4.0-97-gfe0b243

Ubuntu 14.04 长期支持版

Linux bashman 3.13.0-24-generic#46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

rbenv install 2.1.1

给我:https://gist.github.com/astropanic/e4d3a3602612b3c21636

失败似乎与:

compiling readline.c
readline.c: In function ‘Init_readline’:
readline.c:1977:26: error: ‘Function’ undeclared (first use in this function)
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c:1977:26: note: each undeclared identifier is reported only once for each function it appears in
readline.c:1977:36: error: expected expression before ‘)’ token
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c: At top level:
readline.c:634:1: warning: ‘readline_pre_input_hook’ defined but not used [-Wunused-function]
readline_pre_input_hook(void)
^
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20140502004823.5335/ruby-2.1.1/ext/readline'
make[1]: *** [ext/readline/all] Error 2
make[1]: Leaving directory `/tmp/ruby-build.20140502004823.5335/ruby-2.1.1'
make: *** [

build-ext] Error 2

有什么想法吗?

最佳答案

由于 readline 而无法构建 ruby​​ 2.1 似乎是 known error .

我使用 suggested patches 之一成功构建了它像这样:

curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1

将 readline 库降级到版本 6.2.4 是一个替代建议,但我还没有尝试过。

关于ruby - rbenv - 编译 Ruby 2.1.1 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23418227/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com