gpt4 book ai didi

ruby - 安装 linecache19 时出错

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

我一直在尝试运行 bundle install。接下来是我输入的一系列命令和错误消息的相关片段。

bundle update

安装linecache(0.46)时出错,Bundler无法继续。
确保 gem install linecache -v '0.46' 在捆绑前成功。

gem install linecache -v '0.46'

还不能处理 1.9.x

gem install linecache19

正在检查 vm_core.h...否

最后:

gem install linecache19 -- --with-ruby-include=/opt/t/rvm/src/ruby-1.9.3-p194

ERROR: Error installing linecache19:
ERROR: Failed to build gem native extension.

/opt/t/rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb --with-ruby-include=/opt/t/rvm/src/ruby-1.9.3-p194
checking for vm_core.h... yes
checking for version.h... yes
creating Makefile

make
compiling trace_nums.c
In file included from trace_nums.c:21:
/opt/t/rvm/src/ruby-1.9.3-p194/vm_core.h:311:5: error: unknown type name 'rb_event_hook_t'; did you mean 'rb_event_flag_t'?
rb_event_hook_t *event_hooks;
^~~~~~~~~~~~~~~
rb_event_flag_t
/opt/t/rvm/rubies/ruby-2.0.0-p0/include/ruby-2.0.0/ruby/ruby.h:1602:23: note: 'rb_event_flag_t' declared here
typedef unsigned long rb_event_flag_t;
^
In file included from trace_nums.c:21:
/opt/t/rvm/src/ruby-1.9.3-p194/vm_core.h:477:5: error: unknown type name 'rb_event_hook_t'; did you mean 'rb_event_flag_t'?
rb_event_hook_t *event_hooks;
^~~~~~~~~~~~~~~
rb_event_flag_t
/opt/t/rvm/rubies/ruby-2.0.0-p0/include/ruby-2.0.0/ruby/ruby.h:1602:23: note: 'rb_event_flag_t' declared here
typedef unsigned long rb_event_flag_t;
^
trace_nums.c:61:25: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(token) - 1;
~ ~~~~~~~~~~~~~~^~~
1 warning and 2 errors generated.
make: *** [trace_nums.o] Error 1


Gem files will remain installed in /opt/t/rvm/gems/ruby-2.0.0-p0/gems/linecache19-0.5.12 for inspection.
Results logged to /opt/t/rvm/gems/ruby-2.0.0-p0/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out

最佳答案

强制 Gemfile 使用这些版本

gem 'linecache19', '0.5.13', :path => "~/.rvm/gems/ruby-1.9.3-p0/gems/linecache19-0.5.13/"

然后是bundle install

关于ruby - 安装 linecache19 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16206890/

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