【问题标题】:Vagrant unable to mount shared folders - No such file or directoryVagrant 无法挂载共享文件夹 - 没有这样的文件或目录
【发布时间】:2017-08-04 23:15:12
【问题描述】:

我有这个 Vagrantfile

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty32"
  config.vm.hostname = "app.local"
  config.vm.network :private_network, ip: "192.168.20.20"

  config.vm.synced_folder ".", "/vagrant", :mount_options => ['dmode=774','fmode=775']

  config.vm.provider :virtualbox do |vb|
    vb.name = "MyBox"
    vb.memory = 512
    vb.cpus = 2
  end

  config.vm.provision :shell, path: "install.sh"
end

到目前为止我使用没有问题(在 UbuntuWindows 上)。在 Windows 10 上,我已经升级了 Oracle VM Virtual Box (5.1.16) 和 Vagrant (1.9.2),现在在尝试安装该盒子时出现此错误:

Vagrant 无法挂载 VirtualBox 共享文件夹。这通常是 因为文件系统“vboxsf”不可用。这个文件系统是
通过 VirtualBox Guest Additions 和内核模块提供。
请验证这些来宾添加已正确安装在 客人。这不是 Vagrant 中的错误,通常是由错误引起的 流浪盒子。对于上下文,尝试的命令是:

 mount -t vboxsf -o dmode=774,fmode=775,uid=1000,gid=1000 vagrant /vagrant

 The error output from the command was:
 : No such file or directory

我也看到了:

您的主机 (5.1.16) 和来宾 (4.3.36) 上的GuestAdditions 版本不匹配。 * 停止 VirtualBox 添加

然后看起来GuestAdditions被删除并安装了5.1.16版本,步骤结束:

vboxadd.sh:构建 Guest Additions 内核模块。 vboxadd.sh: 启动 VirtualBox 来宾添加。 找不到 X.Org 或 XFree86 窗口系统,正在跳过。

在这之后,我仍然得到:

收到有关已安装的 GuestAdditions 版本的不同报告:
您主机上的 Virtualbox 声称:vm 内的 4.3.36 VBoxService 声明:5.1.16 继续,假设 VBoxService 是正确的......得到 关于已安装的 GuestAdditions 版本的不同报告:Virtualbox 在您的主机声明中: vm 声明中的 4.3.36 VBoxService : 5.1.16 继续,假设VBoxService是正确的……

这是一个错误还是我做错了什么?

【问题讨论】:

标签: vagrant shared-directory vagrant-windows synced-folder


【解决方案1】:

看起来这在 5.1.18 中已修复。更新到最新版本为我解决了这个问题。

Change Log (Version 5.1.18):

  • 共享文件夹:修复了不区分大小写的文件名访问(5.1.16 回归;仅限 Windows 客户机;错误 #16549)
  • 共享文件夹:修复了对长路径的访问(5.1.16 回归;仅限 Windows 客户机;错误 #14651、#16564)

【讨论】:

  • 确实,长路径问题终于解决了
猜你喜欢
  • 1970-01-01
  • 2017-09-15
  • 2020-03-01
  • 1970-01-01
  • 1970-01-01
  • 2015-06-07
  • 2015-04-12
  • 2018-11-26
  • 2019-11-27
相关资源
最近更新 更多