我到处寻找解决方案。我同时安装了linecache19
和ruby_core_source
。
这两个命令都不起作用:
gem install ruby-debug19
gem install ruby-debug19 -- --with-ruby-include=/Users/benjohnson/.rvm/src/ruby-1.9.1-p378
下面是我不断得到的错误:
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug19:
ERROR: Failed to build gem native extension.
/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... no
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... yes
checking for iseq.h... yes
checking for insns.inc... yes
checking for insns_info.inc... yes
checking for eval_intern.h... yes
creating Makefile
make
gcc -I. -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/i386-darwin10.4.0 -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby/backward -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1 -I. -DHAVE_VM_CORE_H -DHAVE_ISEQ_H -DHAVE_INSNS_INC -DHAVE_INSNS_INFO_INC -DHAVE_EVAL_INTERN_H -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby-1.9.1-p378 -fno-common -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o breakpoint.o -c breakpoint.c
gcc -I. -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/i386-darwin10.4.0 -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby/backward -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1 -I. -DHAVE_VM_CORE_H -DHAVE_ISEQ_H -DHAVE_INSNS_INC -DHAVE_INSNS_INFO_INC -DHAVE_EVAL_INTERN_H -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby-1.9.1-p378 -fno-common -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o ruby_debug.o -c ruby_debug.c
ruby_debug.c: In function ‘ruby_method_ptr’:
ruby_debug.c:141: error: ‘rb_method_entry_t’ undeclared (first use in this function)
ruby_debug.c:141: error: (Each undeclared identifier is reported only once
ruby_debug.c:141: error: for each function it appears in.)
ruby_debug.c:141: error: ‘method’ undeclared (first use in this function)
ruby_debug.c:142: warning: implicit declaration of function ‘rb_method_entry’
ruby_debug.c: In function ‘debug_event_hook’:
ruby_debug.c:719: error: ‘rb_method_entry_t’ undeclared (first use in this function)
ruby_debug.c:719: error: ‘me’ undeclared (first use in this function)
make: *** [ruby_debug.o] Error 1
Gem files will remain installed in /Users/benjohnson/.rvm/gems/ruby-1.9.1-p378/gems/ruby-debug-base19-0.11.24 for inspection.
Results logged to /Users/benjohnson/.rvm/gems/ruby-1.9.1-p378/gems/ruby-debug-base19-0.11.24/ext/ruby_debug/gem_make.out
发布于 2010-11-29 19:00:59
我也遇到过同样的问题(在1.9.1和1.9.2)。甚至尝试安装0.11.23都会触发该错误。我发现有必要:
显式gem uninstall ruby-debug-base19
gem install ruby-debug-base19 --version=0.11.23
这就是我获得大部分解决方案的地方:http://rails.brentsowers.com/2010_08_01_archive.html
此外,如果您使用Bundler:
在我升级到最新的Bundler (1.0.2 => 1.0.7)之前,我一直有问题,因为它坚持要安装ruby-debug-base19v0.11.24)。
在你的Gemfile中,确保你已经固定了ruby-debug-base19的版本:
gem "ruby-debug-base19", "0.11.23", :require => nil
发布于 2013-02-17 01:56:34
这个最适合我,因为它看起来不太老土:
gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-head/
别忘了设置$rvm_path。在我的例子中,最后一个文件夹是ruby-1.9.3-head -挑选适合你的那个。
从这里得到了这个答案:ruby-debug install error: failed to build gem native extension
发布于 2013-01-08 22:43:08
在Debian/Ubuntu/Mint上,这个问题可以通过安装其中的一些包来解决(我不确定是哪个导致了这个问题)
apt-get install libcurl4-openssl-dev libgcrypt11-dev libgnutls-dev libitn11-dev libldap2-dev librtmp-dev libtasn1-3-dev m4
https://stackoverflow.com/questions/4180541
复制相似问题