在 Ubuntu 16.04.3 上,我无法再运行 VirtualBox(因此也无法运行 Vagrant)。运行任何 vagrant 命令都会导致:
/usr/lib/ruby/vendor_ruby/vagrant/machine_index.rb:293:in `read': Input/output error @ rb_sysopen - /home/sillyinventor/.vagrant.d/data/machine-index/index (Errno::EIO)
from /usr/lib/ruby/vendor_ruby/vagrant/machine_index.rb:293:in `read'
from /usr/lib/ruby/vendor_ruby/vagrant/machine_index.rb:293:in `unlocked_reload'
from /usr/lib/ruby/vendor_ruby/vagrant/machine_index.rb:53:in `block in initialize'
from /usr/lib/ruby/vendor_ruby/vagrant/machine_index.rb:323:in `block in with_index_lock'
from /usr/lib/ruby/vendor_ruby/vagrant/machine_index.rb:321:in `open'
from /usr/lib/ruby/vendor_ruby/vagrant/machine_index.rb:321:in `with_index_lock'
from /usr/lib/ruby/vendor_ruby/vagrant/machine_index.rb:52:in `initialize'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:637:in `new'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:637:in `machine_index'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:180:in `block in action_runner'
from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:33:in `run'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:439:in `hook'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:688:in `unload'
from /usr/bin/vagrant:176:in `ensure in <main>'
from /usr/bin/vagrant:176:in `<main>'
从命令行运行 VirtualBox 会导致系统在等待开机(包括 sys rq)时完全锁定。出于显而易见的原因,您无法从 TTY 运行 VirtualBox,并且锁定会强制硬关机(因此没有日志)。
我检查了 BIOS,发现虚拟化已启用。硬盘空间充足。我卸载并重新安装(以防文件损坏)。我检查了系统日志,但在崩溃时只有坏字符。我用智能控制检查了硬盘质量,一切似乎都很好。~/.vagrant.ddata/machine-index/index 文件似乎奇怪地无法读取。
我确实安装了更新(apt-get update
和dist-upgrade
),可能与此有关。欢迎提出建议。
答案1
我删除了它~/.vagrant.d/
,现在它可以工作了。