Vagrant 2.0.1 VBox 5.2.6,运行流浪汉时的错误

时间:2018-01-24 05:05:00

标签: vagrant

我一直关注流浪者Getting Started Guide

我遇到一个问题,当使用vagrant up时,vagrant会冻结我的整个机器,所以我做了所建议的here(向下向下滚动到Valross.nu的帖子)。

我在Ubuntu 16.04上安装了Vagrant 2.0.1和VirtualBox 5.2.6。

运行vagrant initvagrant up或几乎任何其他命令时,我会收到以下错误:

/opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:293:in `read': Input/output error @ rb_sysopen - /home/patrick/.vagrant.d/data/machine-index/index (Errno::EIO)
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:293:in `read'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:293:in `unlocked_reload'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:53:in `block in initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:323:in `block in with_index_lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:321:in `open'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:321:in `with_index_lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/machine_index.rb:52:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:741:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:741:in `machine_index'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:215:in `block in action_runner'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/runner.rb:33:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:543:in `hook'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:792:in `unload'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:141:in `ensure in <main>'
    from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:141:in `<main>'

2 个答案:

答案 0 :(得分:2)

这就是我解决问题的方法。

  1. 从工作总监中删除vagrant.d目录。

  2. 运行sudo /sbin/vboxconfig

  3. 让我知道它是否适合你。

答案 1 :(得分:0)

https://superuser.com/questions/1286465/vagrant-and-virtualbox-suddenly-don-t-work-for-me-on-ubuntu-16-04-3似乎还有其他人遇到同样的问题。

我也在那里写了这个评论,但我注意到了 VirtualBox于1月15日发布了新版本;你有没有考虑降级VirtualBox? https://www.virtualbox.org/wiki/Changelog (Vagrant最后一次更新于11月2日,因为我的建议是专注于VirtualBox。https://github.com/hashicorp/vagrant/releases

如果是我,我主要尝试将Vagrant和Virtualbox降级一点(例如,可能仍然是Vagrant 2.0.x和VBox 5.2.x),如果我仍然遇到问题,进一步降级到Vagrant 1.9.x和VBox 5.1.x。

如果这样有效,那么&#34;它的效果足够好&#34;可能没问题(并且可能在工作场所需要),除非您绝对需要可能恰好在最新版本中的任何尖端功能。