2013-09-19 2 views
2

При управлении «расслоении установки» в соответствующем каталоге я получил HTE следующие ошибки:не смог завершить «узелок установить» - не удалось установить linecache19 -v «0.5.12»

An error occurred while installing linecache19 (0.5.12), and Bundler cannot continue. 
Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling. 

На попытке запустить gem install linecache19 -v '0.5.12' (как уже упоминалось), я получаю следующее сообщение об ошибке:

[email protected]:~/voylla_website$ gem install linecache19 -v '0.5.12' 
Building native extensions. This could take a while... 
ERROR: Error installing linecache19: 
ERROR: Failed to build gem native extension. 

    /usr/bin/ruby1.9.1 extconf.rb 
checking for vm_core.h... no 
/home/nishant/.rvm/gems/ruby-1.9.2-p320/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config. 
checking for vm_core.h... no 
*** 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 
--without-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=/usr/bin/ruby1.9.1 
--with-ruby-dir 
--without-ruby-dir 
--with-ruby-include 
--without-ruby-include=${ruby-dir}/include 
--with-ruby-lib 
--without-ruby-lib=${ruby-dir}/lib 
/usr/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': Permission denied - /usr/include/ruby-1.9.1/ruby-1.9.3-p194 (Errno::EACCES) 
from /usr/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir' 
from /usr/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p' 
from /usr/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each' 
from /usr/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p' 
from /usr/lib/ruby/1.9.1/fileutils.rb:205:in `each' 
from /usr/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p' 
from /home/nishant/.rvm/gems/ruby-1.9.2-p320/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:59:in `block in create_makefile_with_core' 
from /usr/lib/ruby/1.9.1/tempfile.rb:320:in `open' 
from /home/nishant/.rvm/gems/ruby-1.9.2-p320/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core' 
from extconf.rb:19:in `<main>' 
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz 
Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz 


Gem files will remain installed in /home/nishant/.rvm/gems/ruby-1.9.2-p320/gems/linecache19-0.5.12 for inspection. 
Results logged to /home/nishant/.rvm/gems/ruby-1.9.2-p320/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out 

затем я попробовал «Судо камень установить linecache19 -v«0.5.12"

[email protected]:~/voylla_website$ sudo gem install linecache19 -v '0.5.12' 
[sudo] password for nishant: 
Fetching: archive-tar-minitar-0.5.2.gem (100%) 
Fetching: ruby_core_source-0.1.5.gem (100%) 
Fetching: linecache19-0.5.12.gem (100%) 
Building native extensions. This could take a while... 
ERROR: Error installing linecache19: 
ERROR: Failed to build gem native extension. 

    /usr/bin/ruby1.9.1 extconf.rb 
checking for vm_core.h... *** 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 
--without-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=/usr/bin/ruby1.9.1 
--with-ruby-dir 
--without-ruby-dir 
--with-ruby-include 
--without-ruby-include=${ruby-dir}/include 
--with-ruby-lib 
--without-ruby-lib=${ruby-dir}/lib 
/usr/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
from /usr/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp' 
from /usr/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header' 
from /usr/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' 
from /usr/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' 
from /usr/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
from /usr/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' 
from /usr/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
from /usr/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' 
from /usr/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' 
from /usr/lib/ruby/1.9.1/mkmf.rb:930:in `have_header' 
from extconf.rb:15:in `block in <main>' 
from /var/lib/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `call' 
from /var/lib/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `create_makefile_with_core' 
from extconf.rb:19:in `<main>' 


Gem files will remain installed in /var/lib/gems/1.9.1/gems/linecache19-0.5.12 for inspection. 
Results logged to /var/lib/gems/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out 

mkmf.log имеет:

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

"gcc -o conftest -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-strict-aliasing -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic -Wl,-export-dynamic  -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm -lc" 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: int main() {return 0;} 
/* end */ 

"gcc -E -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-strict-aliasing -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... -------------------- no 

"gcc -E -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -I/usr/include/ruby-1.9.1/ruby-1.9.3-p194 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-strict-aliasing -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 */ 

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

А теперь я застрял. Что я должен делать дальше.

+1

Выход списков команд первого самоцвета '/usr/bin/ruby1.9.1 extconf.rb', в то время как две линии позже он выглядит, как вы используете рубин 1.9.2 установлен на РВМ. Может быть, убедитесь, что версия рубина, которую вы используете, является rvm, а не установленной системой? – Andy

+0

@ Энди: Как мне это сделать? Достаточно ли «rvm use ruby-1.9.2-p320»? – nish

+0

'rvm use ruby-1.9.2' должно быть достаточно. Вы можете использовать ruby ​​use ruby-1.9.2 --default', чтобы сделать ruby ​​1.9.2 по умолчанию, который используется всякий раз, когда вы запускаете новую оболочку. Если это не сработает, запустите 'which ruby' и' ruby ​​-version', чтобы увидеть, какой рубин получает. – Andy

ответ

11

linecache19 является частью рубинового отладки, который больше не поддерживается и требует ручной обработки. В вашем Gemfile замените ruby-debug-base19 и ruby-debug19 на «gem» debugger » Это должно решить проблему. Подробнее об этом здесь - https://github.com/cldwalker/debugger

5

Для тех, кто используя рубин> = 2.x.x, попробуйте «byebug», потому что «отладчик» доступен только для рубина 1.9.2 и 1.9.3.

gem install 'byebug'

Смежные вопросы