Я следовал руководству " Vagrant Boxs с openSUSE Tumbleweed " для запуска образа Vagrant, но при запуске vagrant up
у меня возникла следующая ошибка:
Traceback (most recent call last):
34: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
33: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/machine.rb:195:in `action'
32: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/machine.rb:195:in `call'
31: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/environment.rb:613:in `lock'
30: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/machine.rb:209:in `block in action'
29: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/machine.rb:238:in `action_raw'
28: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `run'
27: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/util/busy.rb:19:in `busy'
26: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `block in run'
25: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builder.rb:116:in `call'
24: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
23: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
22: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
21: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
20: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
19: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
18: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
17: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
16: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
15: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/box_check_outdated.rb:31:in `call'
14: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
13: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
12: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
11: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
10: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
9: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/call.rb:47:in `call'
8: from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.0.45/lib/vagrant-libvirt/action.rb:44:in `block (2 levels) in action_up'
7: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
6: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
5: from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.0.45/lib/vagrant-libvirt/action/prepare_nfs_settings.rb:1:in `<top (required)>'
4: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
3: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
2: from /usr/lib64/ruby/gems/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri.rb:30:in `<top (required)>'
1: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- nokogiri/2.7/nokogiri (LoadError)
35: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
34: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/machine.rb:195:in `action'
33: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/machine.rb:195:in `call'
32: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/environment.rb:613:in `lock'
31: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/machine.rb:209:in `block in action'
30: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/machine.rb:238:in `action_raw'
29: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `run'
28: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/util/busy.rb:19:in `busy'
27: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `block in run'
26: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builder.rb:116:in `call'
25: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
24: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
23: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
22: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
21: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
20: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
19: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
18: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
17: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
16: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/box_check_outdated.rb:31:in `call'
15: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
14: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
13: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
12: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
11: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
10: from /usr/share/vagrant/gems/gems/vagrant-2.2.6/lib/vagrant/action/builtin/call.rb:47:in `call'
9: from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.0.45/lib/vagrant-libvirt/action.rb:44:in `block (2 levels) in action_up'
8: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
7: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
6: from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.0.45/lib/vagrant-libvirt/action/prepare_nfs_settings.rb:1:in `<top (required)>'
5: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
4: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
3: from /usr/lib64/ruby/gems/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri.rb:28:in `<top (required)>'
2: from /usr/lib64/ruby/gems/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri.rb:32:in `rescue in <top (required)>'
1: from /home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/home/test/.rbenv/versions/2.7.0/lib64/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in
`require': incompatible library version -
/usr/lib64/ruby/gems/2.6.0/gems/nokogiri-1.10.7/lib/nokogiri/nokogiri.so
(LoadError)
Я использую rbenv с Ruby 2.7.0. Nokogiri 1.9.0 установлен в
~/.rbenv/versions/2.7.0/lib64/ruby/gems/2.7.0/gems/
Vagrant версии 2.2.6 и Vagrant Libvirt v0.0.45-4.1.
Почему он ищет Nokogiri в
/usr/lib64/ruby/gems/2.6.0/gems
, поскольку rbenv version
возвращает 2.7.0 (а не "system") и почему он не может загрузить версию из
~/.rbenv/versions/2.7.0/lib64/ruby/2.7.0
Вывод из gem env
RubyGems Environment:
- RUBYGEMS VERSION: 3.1.2
- RUBY VERSION: 2.7.0 (2019-12-25 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/test/.rbenv/versions/2.7.0/lib64/ruby/gems/2.7.0
- USER INSTALLATION DIRECTORY: /home/test/.gem/ruby/2.7.0
- RUBY EXECUTABLE: /home/test/.rbenv/versions/2.7.0/bin/ruby
- GIT EXECUTABLE: /usr/bin/git
- EXECUTABLE DIRECTORY: /home/test/.rbenv/versions/2.7.0/bin
- SPEC CACHE DIRECTORY: /home/test/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /home/test/.rbenv/versions/2.7.0/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/test/.rbenv/versions/2.7.0/lib64/ruby/gems/2.7.0
- /home/test/.gem/ruby/2.7.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/test/.rbenv/versions/2.7.0/bin
- /home/test/.rbenv/libexec
- /home/test/.rbenv/plugins/ruby-build/bin
- /home/test/.rbenv/shims
- /home/test/.rbenv/bin
- /home/test/.rbenv/shims
- /home/test/.rbenv/bin
- /home/test/bin
- /usr/local/bin
- /usr/bin
- /bin
и рбенв-доктор
Checking for `rbenv' in PATH: /home/test/.rbenv/bin/rbenv
Checking for rbenv shims in PATH: OK
Checking `rbenv install' support: /home/test/.rbenv/plugins/ruby-build/bin/rbenv-install (ruby-build 20200115-8-g73b926b)
Counting installed Ruby versions: 1 versions
Checking RubyGems settings: OK
Auditing installed plugins: OK