由于某些原因,我必须使用 VirtualBox 版本 5.2。
我还需要 Guest Additions 插件。
当我运行时vagrant plugin install vagrant-vbguest
,它就vagrant-vbguest-0.23.0
为我安装。
当我启动该盒子时,我看到了这些消息:
GuestAdditions are newer than your host but, downgrades are disabled. Skipping.
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 6.1.2
default: VirtualBox Version: 5.2
我尝试了以下操作但失败了:
$ vagrant plugin install vagrant-vbguest --plugin-version 5.2.0
Installing the 'vagrant-vbguest --version '5.2.0'' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
Unable to resolve dependency: user requested 'vagrant-vbguest (= 5.2.0)'
我相信该插件有不同的版本控制方案。这是因为当我卸载插件时,日志显示:
$ vagrant plugin uninstall vagrant-vbguest
Uninstalling the 'vagrant-vbguest' plugin...
Successfully uninstalled micromachine-2.0.0
Successfully uninstalled vagrant-vbguest-0.23.0
那么 Guest Addition 版本 6.1.2 在某些远程存储库中实际上是 0.23.0?
那么在这种情况下正确的版本号是多少Guest Additions
?我敢打赌它可能是 5.2.x,但是 x 是什么?我怎么才能找到?
答案1
有点晚了,但是你尝试过强制安装吗?
在你跑完之后
$ vagrant up
你可以尝试运行
$ vagrant vbguest --do install
这可能会强制安装正确的版本。
执行此命令后重新加载虚拟机
$ vagrant reload
检查两个系统是否运行同一版本
$ vagrant vbguest --status
我希望这能有所帮助。即使时间过去了,你可能已经有了解决方案:D