2013-02-08 216 views
2

當我捆綁安裝即時通訊獲取以下錯誤"An error occurred while installing linecache19 (0.5.11), and Bundler cannot continue"。完整的跟蹤如下:無法安裝linecache19寶石

Installing linecache19 (0.5.11) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

     /home/raza/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb                           
checking for vm_core.h... no                                     
/home/raza/.rvm/gems/[email protected]/gems/ruby_core_source-0.1.4/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config.     
checking for vm_core.h... yes                                    
checking for version.h... yes                                    
checking for RUBY_VERSION_MAJOR in version.h... no                               
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p362.tar.gz                          
Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p362.tar.gz                          
checking for vm_core.h... yes 
checking for version.h... yes 
checking for RUBY_VERSION_MAJOR in version.h... no 
Makefile creation failed 
************************************************************* 

    NOTE: For Ruby 1.9 installation instructions, please see: 

    http://wiki.github.com/mark-moseley/ruby-debug 

************************************************************* 

*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
     --with-opt-dir 
     --with-opt-include 
     --without-opt-include=${opt-dir}/include 
     --with-opt-lib 
     --without-opt-lib=${opt-dir}/lib 
     --with-make-prog 
     --without-make-prog 
     --srcdir=. 
     --curdir 
     --ruby=/home/raza/.rvm/rubies/ruby-1.9.3-p362/bin/ruby 
     --with-ruby-dir 
     --without-ruby-dir 
     --with-ruby-include 
     --without-ruby-include=${ruby-dir}/include 
     --with-ruby-lib 
     --without-ruby-lib=${ruby-dir}/lib 


Gem files will remain installed in /home/raza/.rvm/gems/[email protected]/gems/linecache19-0.5.11 for inspection. 
Results logged to /home/raza/.rvm/gems/[email protected]/gems/linecache19-0.5.11/ext/trace_nums/gem_make.out 
An error occurred while installing linecache19 (0.5.11), and Bundler cannot continue. 
Make sure that `gem install linecache19 -v '0.5.11'` succeeds before bundling. 

然後我試圖運行gem install linecache19 -v '0.5.11'以及gem install linecache19 -v '0.5.11' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p362但仍面臨着同樣的問題。

我mkmf.log位於~/.rvm/gems/[email protected]/gems/linecache19-0.5.11/ext/trace_nums如下:

have_header: checking for vm_core.h... -------------------- no 

"gcc -o conftest -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/x86_64-linux -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby/backward -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1 -I. -I/home/raza/.rvm/usr/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/raza/.rvm/rubies/ruby-1.9.3-p362/lib -Wl,-R/home/raza/.rvm/rubies/ruby-1.9.3-p362/lib -L/home/raza/.rvm/usr/lib -Wl,-R/home/raza/.rvm/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/home/raza/.rvm/usr/lib -Wl,-R/home/raza/.rvm/usr/lib  -Wl,-R -Wl,/home/raza/.rvm/rubies/ruby-1.9.3-p362/lib -L/home/raza/.rvm/rubies/ruby-1.9.3-p362/lib -lruby -lpthread -lrt -ldl -lcrypt -lm -lc" 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: int main() {return 0;} 
/* end */ 

"gcc -E -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/x86_64-linux -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby/backward -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1 -I. -I/home/raza/.rvm/usr/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -o conftest.i" 
conftest.c:3:21: fatal error: vm_core.h: No such file or directory 
compilation terminated. 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <vm_core.h> 
/* end */ 

-------------------- 

have_header: checking for vm_core.h... -------------------- yes 

"gcc -E -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/x86_64-linux -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby/backward -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1 -I. -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby-1.9.3-p362 -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -o conftest.i" 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <vm_core.h> 
/* end */ 

-------------------- 

have_header: checking for version.h... -------------------- yes 

"gcc -E -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/x86_64-linux -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby/backward -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1 -I. -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby-1.9.3-p362 -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -o conftest.i" 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <version.h> 
/* end */ 

-------------------- 

have_macro: checking for RUBY_VERSION_MAJOR in version.h... -------------------- no 

"gcc -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/x86_64-linux -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby/backward -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1 -I. -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby-1.9.3-p362 -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC -c conftest.c" 
conftest.c:6:3: error: #error 
conftest.c:7:1: error: expected identifier or ‘(’ before ‘>>’ token 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <version.h> 
4: /*top*/ 
5: #ifndef RUBY_VERSION_MAJOR 
6: # error 
7: >>>>>> RUBY_VERSION_MAJOR undefined <<<<<< 
8: #endif 
/* end */ 

-------------------- 

have_header: checking for vm_core.h... -------------------- yes 

"gcc -E -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/x86_64-linux -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby/backward -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1 -I. -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby-1.9.3-p362 -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -o conftest.i" 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <vm_core.h> 
/* end */ 

-------------------- 

have_header: checking for version.h... -------------------- yes 

"gcc -E -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/x86_64-linux -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby/backward -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1 -I. -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby-1.9.3-p362 -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -o conftest.i" 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <version.h> 
/* end */ 

-------------------- 

have_macro: checking for RUBY_VERSION_MAJOR in version.h... -------------------- no 

"gcc -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/x86_64-linux -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby/backward -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1 -I. -I/home/raza/.rvm/rubies/ruby-1.9.3-p362/include/ruby-1.9.1/ruby-1.9.3-p362 -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC -c conftest.c" 
conftest.c:6:3: error: #error 
conftest.c:7:1: error: expected identifier or ‘(’ before ‘>>’ token 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: #include <version.h> 
4: /*top*/ 
5: #ifndef RUBY_VERSION_MAJOR 
6: # error 
7: >>>>>> RUBY_VERSION_MAJOR undefined <<<<<< 
8: #endif 
/* end */ 

-------------------- 

林在運行Ubuntu 12.10的機器上。我該如何解決這個問題?

謝謝你

回答

1

你需要首先安裝ruby-debug,通過include目錄。

寶石安裝紅寶石debug19 - --with-紅寶石包括= $ rvm_path/src目錄/紅寶石1.9.3-P362