首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu上的流浪汉-无法加载这样的文件- rexml (LoadError)

Ubuntu上的流浪汉-无法加载这样的文件- rexml (LoadError)
EN

Stack Overflow用户
提问于 2022-07-22 09:49:18
回答 1查看 199关注 0票数 -1

我正试图从VirtualBox迁移到libvirt,有些问题我无法解决和理解。我的一位同事在debian上进行了测试,对他来说一切都很好。

描述了bug 来再现步骤,以再现行为:

代码语言:javascript
复制
git clone git@github.com:robinportigliatti/libvirt-test.git
cd libvirt-test
make up
代码语言:javascript
复制
Bringing machine 'host1' up with 'libvirt' provider...
Traceback (most recent call last):
    21: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
    20: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:201:in `action'
    19: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:201:in `call'
    18: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/environment.rb:613:in `lock'
    17: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:215:in `block in action'
    16: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:243:in `action_raw'
    15: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `run'
    14: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/util/busy.rb:19:in `busy'
    13: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `block in run'
    12: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builder.rb:149:in `call'
    11: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
    10: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
     9: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
     8: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/box_check_outdated.rb:31:in `call'
     7: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
     6: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/call.rb:47:in `call'
     5: from /home/robin/.vagrant.d/gems/2.6.6/gems/vagrant-libvirt-0.9.0/lib/vagrant-libvirt/action.rb:99:in `block (2 levels) in action_up'
     4: from /opt/vagrant/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
     3: from /opt/vagrant/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
     2: from /home/robin/.vagrant.d/gems/2.6.6/gems/vagrant-libvirt-0.9.0/lib/vagrant-libvirt/action/resolve_disk_settings.rb:4:in `<top (required)>'
     1: from /opt/vagrant/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/opt/vagrant/embedded/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rexml (LoadError)

预期行为 Machine host1应该启动

版本(请填写以下信息):

  • Libvirt版本:
代码语言:javascript
复制
Compiled against library: libvirt 8.0.0
Using library: libvirt 8.0.0
Using API: QEMU 8.0.0
Running hypervisor: QEMU 6.2.0
  • vagrant version的迷航版本输出
代码语言:javascript
复制
Installed Version: 2.2.10
Latest Version: 2.2.19
 
To upgrade to the latest version, visit the downloads page and
download and install the latest version of Vagrant from the URL
below:

  https://www.vagrantup.com/downloads.html

If you're curious what changed in the latest release, view the
CHANGELOG below:

  https://github.com/hashicorp/vagrant/blob/v2.2.19/CHANGELOG.md
  • 漂泊味上游或地区
代码语言:javascript
复制
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:    22.04
Codename:   jammy
  • vagrant plugin list的插件版本(包括迷航器-libvirt)输出
代码语言:javascript
复制
vagrant-libvirt (0.9.0, global)
vagrant-vbguest (0.30.0, global)

调试日志附加VAGRANT_LOG=debug vagrant up --provider=libvirt >vagrant.log 2>&1 在这里输入链接描述的输出

我发现我在我的机器上安装了Ruby3.0并删除了它。现在,我只有嵌入Ruby版本的迷幻药,即:

代码语言:javascript
复制
/opt/vagrant/embedded/bin/ruby --version
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]

考虑过运行/opt/vagrant/embedded/bin/gem install rexml,但得到了以下错误:

代码语言:javascript
复制
ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR:  You must add /OU=GlobalSign Root CA - R3/O=GlobalSign/CN=GlobalSign to your local trusted store
ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR:  You must add /OU=GlobalSign Root CA - R3/O=GlobalSign/CN=GlobalSign to your local trusted store
ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR:  You must add /OU=GlobalSign Root CA - R3/O=GlobalSign/CN=GlobalSign to your local trusted store
ERROR:  Could not find a valid gem 'rexml' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) (https://rubygems.org/specs.4.8.gz)
ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR:  You must add /OU=GlobalSign Root CA - R3/O=GlobalSign/CN=GlobalSign to your local trusted store
ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR:  You must add /OU=GlobalSign Root CA - R3/O=GlobalSign/CN=GlobalSign to your local trusted store

检查了证书:

代码语言:javascript
复制
sudo /opt/vagrant/embedded/bin/curl -Lks 'https://git.io/rg-ssl' | sudo /opt/vagrant/embedded/bin/ruby
Here's your Ruby and OpenSSL environment:

Ruby:           2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
RubyGems:       3.0.3
Bundler:        1.17.2
Compiled with:  OpenSSL 1.1.1g  21 Apr 2020
Loaded version: OpenSSL 1.1.1g  21 Apr 2020
SSL_CERT_FILE:  /opt/vagrant/embedded/cert.pem
SSL_CERT_DIR:   /opt/vagrant/embedded/certs

With that out of the way, let's see if you can connect to rubygems.org...

Bundler connection to rubygems.org:       failed  ❌  (certificate verification)
ERROR:  SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR:  You must add /OU=GlobalSign Root CA - R3/O=GlobalSign/CN=GlobalSign to your local trusted store
RubyGems connection to rubygems.org:      failed  ❌  (certificate verification)
Ruby net/http connection to rubygems.org: failed  ❌

Unfortunately, this Ruby can't connect to rubygems.org. 
Your Ruby can't connect to rubygems.org because you are missing the certificate files OpenSSL needs to verify you are connecting to the genuine rubygems.org servers.

更新证书:

代码语言:javascript
复制
sudo wget https://raw.githubusercontent.com/rubygems/rubygems/master/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
sudo cp GlobalSignRootCA_R3.pem /usr/local/share/ca-certificates/GlobalSignRootCA_R3.pem
sudo update-ca-certificates

同样的错误。

任何帮助帮助我解决我的问题都是非常感激的。

罗宾

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-07-25 09:10:11

消除所有的流浪依赖和执行一个干净的安装工作。

是流浪汉的臭虫。

诚挚的问候,

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73078369

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档